summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Royds <douglas.royds@taitradio.com>2018-11-28 17:53:10 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-03 12:20:01 +0000
commitfa424823b6329ca491156ac1db3f93a87c046011 (patch)
treeb934b6b7f454d865fe5eb79d5a27abcc7cf3cc02
parentd3d09bd064466e887e964fc460a1208882efc9de (diff)
downloadpoky-fa424823b6329ca491156ac1db3f93a87c046011.tar.gz
ptest: Optionally strip build host tool info from installed files
Several packages (eg. acl, attr, openssl) install Makefiles or other build host configuration files for ptest so that they can run `make check`, for instance. These build host files commonly include paths and versions of build host tools, (eg. rpm or perl) whose presence and version depends on the build host distro. Optionally strip lines from installed PTEST_BUILD_HOST_FILES using an extended regex pattern defined in PTEST_BUILD_HOST_PATTERN. This has no effect on the on-target ptest. (From OE-Core rev: a3b657470eeea9f1954bc3a3e593a5c4907b6f17) Signed-off-by: Douglas Royds <douglas.royds@taitradio.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/ptest.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index fa518f6d45..97865c9338 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -4,6 +4,7 @@ This package contains a test directory ${PTEST_PATH} for package test purposes."
4 4
5PTEST_PATH ?= "${libdir}/${BPN}/ptest" 5PTEST_PATH ?= "${libdir}/${BPN}/ptest"
6PTEST_BUILD_HOST_FILES ?= "Makefile" 6PTEST_BUILD_HOST_FILES ?= "Makefile"
7PTEST_BUILD_HOST_PATTERN ?= ""
7 8
8FILES_${PN}-ptest = "${PTEST_PATH}" 9FILES_${PN}-ptest = "${PTEST_PATH}"
9SECTION_${PN}-ptest = "devel" 10SECTION_${PN}-ptest = "devel"
@@ -56,6 +57,10 @@ do_install_ptest_base() {
56 -e 's#${WORKDIR}/*=#.=#g' \ 57 -e 's#${WORKDIR}/*=#.=#g' \
57 -e 's#${WORKDIR}/*##g' \ 58 -e 's#${WORKDIR}/*##g' \
58 -i $installed_ptest_file 59 -i $installed_ptest_file
60 if [ -n "${PTEST_BUILD_HOST_PATTERN}" ]; then
61 sed -E '/${PTEST_BUILD_HOST_PATTERN}/d' \
62 -i $installed_ptest_file
63 fi
59 done 64 done
60 done 65 done
61} 66}