aboutsummaryrefslogtreecommitdiffstats
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-11-29 10:24:53 +0000
commit6a7361f713ed3306195a795db2a4b000e8f51fe8 (patch)
treeadddffdc7c186b1fb69495aad01c059fc7a63729
parent0b9f553f3774a45bee3b56496f3a19d90452445a (diff)
downloadopenembedded-core-contrib-6a7361f713ed3306195a795db2a4b000e8f51fe8.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. 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."
PTEST_PATH ?= "${libdir}/${BPN}/ptest"
PTEST_BUILD_HOST_FILES ?= "Makefile"
+PTEST_BUILD_HOST_PATTERN ?= ""
FILES_${PN}-ptest = "${PTEST_PATH}"
SECTION_${PN}-ptest = "devel"
@@ -56,6 +57,10 @@ do_install_ptest_base() {
-e 's#${WORKDIR}/*=#.=#g' \
-e 's#${WORKDIR}/*##g' \
-i $installed_ptest_file
+ if [ -n "${PTEST_BUILD_HOST_PATTERN}" ]; then
+ sed -E '/${PTEST_BUILD_HOST_PATTERN}/d' \
+ -i $installed_ptest_file
+ fi
done
done
}