summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r--meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch34
-rw-r--r--meta/recipes-devtools/python/python/run-ptest4
-rw-r--r--meta/recipes-devtools/python/python_2.7.15.bb25
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 @@
1Add 'build-test' and 'runtest-TESTS' targets to Makefile, to build and run tests
2cross-compiled.
3
4Signed-off-by: Tudor Florea <tudor.florea@enea.com>
5Upstream-Status: Pending
6---
7Index: 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
5make -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' 3python -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 472c1da4bf..e7010bb689 100644
--- a/meta/recipes-devtools/python/python_2.7.15.bb
+++ b/meta/recipes-devtools/python/python_2.7.15.bb
@@ -24,7 +24,6 @@ SRC_URI += "\
24 file://avoid_warning_about_tkinter.patch \ 24 file://avoid_warning_about_tkinter.patch \
25 file://avoid_warning_for_sunos_specific_module.patch \ 25 file://avoid_warning_for_sunos_specific_module.patch \
26 file://python-2.7.3-remove-bsdb-rpath.patch \ 26 file://python-2.7.3-remove-bsdb-rpath.patch \
27 file://fix-makefile-for-ptest.patch \
28 file://run-ptest \ 27 file://run-ptest \
29 file://parallel-makeinst-create-bindir.patch \ 28 file://parallel-makeinst-create-bindir.patch \
30 file://use_sysroot_ncurses_instead_of_host.patch \ 29 file://use_sysroot_ncurses_instead_of_host.patch \
@@ -35,7 +34,7 @@ SRC_URI += "\
35 34
36S = "${WORKDIR}/Python-${PV}" 35S = "${WORKDIR}/Python-${PV}"
37 36
38inherit autotools multilib_header python-dir pythonnative 37inherit autotools multilib_header python-dir pythonnative ptest
39 38
40CONFIGUREOPTS += " --with-system-ffi " 39CONFIGUREOPTS += " --with-system-ffi "
41 40
@@ -168,27 +167,7 @@ FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
168RDEPENDS_${PN}-modules += "${PN}-misc" 167RDEPENDS_${PN}-modules += "${PN}-misc"
169 168
170# ptest 169# ptest
171RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests" 170RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip"
172#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
173inherit ptest
174
175# This must come after inherit ptest for the override to take effect
176do_install_ptest() {
177 cp ${B}/Makefile ${D}${PTEST_PATH}
178 sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
179 -e s:LIBDIR:${libdir}:g \
180 -i ${D}${PTEST_PATH}/run-ptest
181
182 #Remove build host references
183 sed -i \
184 -e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
185 -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
186 -e 's|${DEBUG_PREFIX_MAP}||g' \
187 -e 's:${HOSTTOOLS_DIR}/::g' \
188 -e 's:${RECIPE_SYSROOT}::g' \
189 -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
190 ${D}/${PTEST_PATH}/Makefile
191}
192 171
193# catch manpage 172# catch manpage
194PACKAGES += "${PN}-man" 173PACKAGES += "${PN}-man"