diff options
| -rw-r--r-- | meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch | 34 | ||||
| -rw-r--r-- | meta/recipes-devtools/python/python/run-ptest | 4 | ||||
| -rw-r--r-- | meta/recipes-devtools/python/python_2.7.15.bb | 25 |
3 files changed, 3 insertions, 60 deletions
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 index 60d782cd26..0000000000 --- a/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | Add 'build-test' and 'runtest-TESTS' targets to Makefile, to build and run tests | ||
| 2 | cross-compiled. | ||
| 3 | |||
| 4 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
| 5 | Upstream-Status: Pending | ||
| 6 | --- | ||
| 7 | Index: Python-2.7.14/Makefile.pre.in | ||
| 8 | =================================================================== | ||
| 9 | --- Python-2.7.14.orig/Makefile.pre.in | ||
| 10 | +++ Python-2.7.14/Makefile.pre.in | ||
| 11 | @@ -846,14 +846,19 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho | ||
| 12 | |||
| 13 | .PHONY: test testall testuniversal buildbottest pythoninfo | ||
| 14 | |||
| 15 | -TESTOPTS= -l $(EXTRATESTOPTS) | ||
| 16 | +TESTOPTS= -l -v $(EXTRATESTOPTS) | ||
| 17 | TESTPROG= $(srcdir)/Lib/test/regrtest.py | ||
| 18 | -TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) | ||
| 19 | -test: @DEF_MAKE_RULE@ platform | ||
| 20 | - -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f | ||
| 21 | +TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) | ||
| 22 | +test: build-test | ||
| 23 | + $(MAKE) runtest-TESTS | ||
| 24 | + | ||
| 25 | +runtest-TESTS: | ||
| 26 | + -find $(srcdir) -name '*.py[co]' -print | xargs rm -f | ||
| 27 | -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) | ||
| 28 | $(TESTPYTHON) $(TESTPROG) $(TESTOPTS) | ||
| 29 | |||
| 30 | +build-test: @DEF_MAKE_RULE@ platform | ||
| 31 | + | ||
| 32 | testall: @DEF_MAKE_RULE@ platform | ||
| 33 | -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f | ||
| 34 | $(TESTPYTHON) $(srcdir)/Lib/compileall.py | ||
diff --git a/meta/recipes-devtools/python/python/run-ptest b/meta/recipes-devtools/python/python/run-ptest index a2f9eed444..832551a124 100644 --- a/meta/recipes-devtools/python/python/run-ptest +++ b/meta/recipes-devtools/python/python/run-ptest | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | # | ||
| 3 | #This script is used to run python test suites | ||
| 4 | 2 | ||
| 5 | 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' | 3 | 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' |
diff --git a/meta/recipes-devtools/python/python_2.7.15.bb b/meta/recipes-devtools/python/python_2.7.15.bb index 3044c3d363..1168f2a167 100644 --- a/meta/recipes-devtools/python/python_2.7.15.bb +++ b/meta/recipes-devtools/python/python_2.7.15.bb | |||
| @@ -23,7 +23,6 @@ SRC_URI += "\ | |||
| 23 | file://avoid_warning_about_tkinter.patch \ | 23 | file://avoid_warning_about_tkinter.patch \ |
| 24 | file://avoid_warning_for_sunos_specific_module.patch \ | 24 | file://avoid_warning_for_sunos_specific_module.patch \ |
| 25 | file://python-2.7.3-remove-bsdb-rpath.patch \ | 25 | file://python-2.7.3-remove-bsdb-rpath.patch \ |
| 26 | file://fix-makefile-for-ptest.patch \ | ||
| 27 | file://run-ptest \ | 26 | file://run-ptest \ |
| 28 | file://parallel-makeinst-create-bindir.patch \ | 27 | file://parallel-makeinst-create-bindir.patch \ |
| 29 | file://use_sysroot_ncurses_instead_of_host.patch \ | 28 | file://use_sysroot_ncurses_instead_of_host.patch \ |
| @@ -34,7 +33,7 @@ SRC_URI += "\ | |||
| 34 | 33 | ||
| 35 | S = "${WORKDIR}/Python-${PV}" | 34 | S = "${WORKDIR}/Python-${PV}" |
| 36 | 35 | ||
| 37 | inherit autotools multilib_header python-dir pythonnative | 36 | inherit autotools multilib_header python-dir pythonnative ptest |
| 38 | 37 | ||
| 39 | CONFIGUREOPTS += " --with-system-ffi " | 38 | CONFIGUREOPTS += " --with-system-ffi " |
| 40 | 39 | ||
| @@ -167,27 +166,7 @@ FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" | |||
| 167 | RDEPENDS_${PN}-modules += "${PN}-misc" | 166 | RDEPENDS_${PN}-modules += "${PN}-misc" |
| 168 | 167 | ||
| 169 | # ptest | 168 | # ptest |
| 170 | RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests" | 169 | RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip" |
| 171 | #inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten | ||
| 172 | inherit ptest | ||
| 173 | |||
| 174 | # This must come after inherit ptest for the override to take effect | ||
| 175 | do_install_ptest() { | ||
| 176 | cp ${B}/Makefile ${D}${PTEST_PATH} | ||
| 177 | sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \ | ||
| 178 | -e s:LIBDIR:${libdir}:g \ | ||
| 179 | -i ${D}${PTEST_PATH}/run-ptest | ||
| 180 | |||
| 181 | #Remove build host references | ||
| 182 | sed -i \ | ||
| 183 | -e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ | ||
| 184 | -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ | ||
| 185 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
| 186 | -e 's:${HOSTTOOLS_DIR}/::g' \ | ||
| 187 | -e 's:${RECIPE_SYSROOT}::g' \ | ||
| 188 | -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ | ||
| 189 | ${D}/${PTEST_PATH}/Makefile | ||
| 190 | } | ||
| 191 | 170 | ||
| 192 | # catch manpage | 171 | # catch manpage |
| 193 | PACKAGES += "${PN}-man" | 172 | PACKAGES += "${PN}-man" |
