]> code.ossystems Code Review - openembedded-core.git/commitdiff
python: clean up ptest
authorRoss Burton <ross.burton@intel.com>
Fri, 12 Oct 2018 11:55:02 +0000 (12:55 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 13 Oct 2018 15:03:44 +0000 (16:03 +0100)
As the manifest handling is done differently now, just inherit ptest with the
other inherits.

test_shutil needs unzip so add to RDEPENDS.

Instead of using a patched Makefile, call test.regrtest directly.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch [deleted file]
meta/recipes-devtools/python/python/run-ptest
meta/recipes-devtools/python/python_2.7.15.bb

diff --git a/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch b/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
deleted file mode 100644 (file)
index 60d782c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-Add 'build-test' and 'runtest-TESTS' targets to Makefile, to build and run tests
-cross-compiled.
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-Upstream-Status: Pending
----
-Index: Python-2.7.14/Makefile.pre.in
-===================================================================
---- Python-2.7.14.orig/Makefile.pre.in
-+++ Python-2.7.14/Makefile.pre.in
-@@ -846,14 +846,19 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
- .PHONY: test testall testuniversal buildbottest pythoninfo
--TESTOPTS=     -l $(EXTRATESTOPTS)
-+TESTOPTS=     -l -v $(EXTRATESTOPTS)
- TESTPROG=     $(srcdir)/Lib/test/regrtest.py
--TESTPYTHON=   $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
--test:         @DEF_MAKE_RULE@ platform
--              -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
-+TESTPYTHON=   $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
-+test:         build-test
-+              $(MAKE) runtest-TESTS
-+
-+runtest-TESTS:
-+              -find $(srcdir) -name '*.py[co]' -print | xargs rm -f
-               -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-               $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-+build-test:   @DEF_MAKE_RULE@ platform
-+
- testall:      @DEF_MAKE_RULE@ platform
-               -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
-               $(TESTPYTHON) $(srcdir)/Lib/compileall.py
index a2f9eed44416db1ce947272f16868a0423f88a98..832551a1244d159182c9a6281a3a87ea40c3c1c3 100644 (file)
@@ -1,5 +1,3 @@
 #!/bin/sh
-#
-#This script is used to run python test suites
 
-make -f LIBDIR/python/ptest/Makefile -k runtest-TESTS srcdir=LIBDIR/python2.7 TESTPROG=LIBDIR/python2.7/test/regrtest.py | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+python -m test.regrtest -v | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
index 472c1da4bf7db7218b3dad145519daab29bb9d80..e7010bb68909fb92f2f8d2513c61dbf17447b1a9 100644 (file)
@@ -24,7 +24,6 @@ SRC_URI += "\
   file://avoid_warning_about_tkinter.patch \
   file://avoid_warning_for_sunos_specific_module.patch \
   file://python-2.7.3-remove-bsdb-rpath.patch \
-  file://fix-makefile-for-ptest.patch \
   file://run-ptest \
   file://parallel-makeinst-create-bindir.patch \
   file://use_sysroot_ncurses_instead_of_host.patch \
@@ -35,7 +34,7 @@ SRC_URI += "\
 
 S = "${WORKDIR}/Python-${PV}"
 
-inherit autotools multilib_header python-dir pythonnative
+inherit autotools multilib_header python-dir pythonnative ptest
 
 CONFIGUREOPTS += " --with-system-ffi "
 
@@ -168,27 +167,7 @@ FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
 RDEPENDS_${PN}-modules += "${PN}-misc"
 
 # ptest
-RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
-#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
-inherit ptest
-
-# This must come after inherit ptest for the override to take effect
-do_install_ptest() {
-       cp ${B}/Makefile ${D}${PTEST_PATH}
-       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
-}
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip"
 
 # catch manpage
 PACKAGES += "${PN}-man"