summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/ptest.bbclass13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 9d8a79854a..fa518f6d45 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -3,6 +3,8 @@ DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION} \
3This package contains a test directory ${PTEST_PATH} for package test purposes." 3This 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"
7
6FILES_${PN}-ptest = "${PTEST_PATH}" 8FILES_${PN}-ptest = "${PTEST_PATH}"
7SECTION_${PN}-ptest = "devel" 9SECTION_${PN}-ptest = "devel"
8ALLOW_EMPTY_${PN}-ptest = "1" 10ALLOW_EMPTY_${PN}-ptest = "1"
@@ -45,6 +47,17 @@ do_install_ptest_base() {
45 fi 47 fi
46 do_install_ptest 48 do_install_ptest
47 chown -R root:root ${D}${PTEST_PATH} 49 chown -R root:root ${D}${PTEST_PATH}
50
51 # Strip build host paths from any installed Makefile
52 for filename in ${PTEST_BUILD_HOST_FILES}; do
53 for installed_ptest_file in $(find ${D}${PTEST_PATH} -type f -name $filename); do
54 bbnote "Stripping host paths from: $installed_ptest_file"
55 sed -e 's#${HOSTTOOLS_DIR}/*##g' \
56 -e 's#${WORKDIR}/*=#.=#g' \
57 -e 's#${WORKDIR}/*##g' \
58 -i $installed_ptest_file
59 done
60 done
48} 61}
49 62
50do_configure_ptest_base[dirs] = "${B}" 63do_configure_ptest_base[dirs] = "${B}"