]> code.ossystems Code Review - openembedded-core.git/commitdiff
python-ptest: various fixes
authorJuro Bystricky <juro.bystricky@intel.com>
Thu, 5 Oct 2017 18:22:28 +0000 (11:22 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 Oct 2017 11:22:44 +0000 (12:22 +0100)
python-ptest needs python-tests package installed in order to
run any tests.
This patch adds python-tests as a runtime dependency, so the test suite
will be present in the image.
While in there, also removed several build host references.

[YOCTO #12144]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/python/python_2.7.13.bb

index 4d73cd25c8bb620e26cd0f990483069f29d4737e..877069943ee5a3e34cfd94293b1bc2af02200571 100644 (file)
@@ -154,7 +154,7 @@ FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
 PACKAGES += "${PN}-misc"
 FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
 RDEPENDS_${PN}-modules += "${PN}-misc"
-RDEPENDS_${PN}-ptest = "${PN}-modules"
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
 #inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
 inherit ptest
 
@@ -164,6 +164,16 @@ do_install_ptest() {
        sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
         -e s:LIBDIR:${libdir}:g \
         -i ${D}${PTEST_PATH}/run-ptest
+
+       #Remove build host references
+       sed -i \
+               -e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+           -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+           -e 's|${DEBUG_PREFIX_MAP}||g' \
+           -e 's:${HOSTTOOLS_DIR}/::g' \
+           -e 's:${RECIPE_SYSROOT}::g' \
+           -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+       ${D}/${PTEST_PATH}/Makefile
 }
 
 # catch manpage