diff options
Diffstat (limited to 'meta/classes/ptest.bbclass')
-rw-r--r-- | meta/classes/ptest.bbclass | 13 |
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} \ | |||
3 | This package contains a test directory ${PTEST_PATH} for package test purposes." | 3 | This package contains a test directory ${PTEST_PATH} for package test purposes." |
4 | 4 | ||
5 | PTEST_PATH ?= "${libdir}/${BPN}/ptest" | 5 | PTEST_PATH ?= "${libdir}/${BPN}/ptest" |
6 | PTEST_BUILD_HOST_FILES ?= "Makefile" | ||
7 | |||
6 | FILES_${PN}-ptest = "${PTEST_PATH}" | 8 | FILES_${PN}-ptest = "${PTEST_PATH}" |
7 | SECTION_${PN}-ptest = "devel" | 9 | SECTION_${PN}-ptest = "devel" |
8 | ALLOW_EMPTY_${PN}-ptest = "1" | 10 | ALLOW_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 | ||
50 | do_configure_ptest_base[dirs] = "${B}" | 63 | do_configure_ptest_base[dirs] = "${B}" |