summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-10-12 12:55:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-14 09:20:56 +0100
commit64ff0a5e6c76803e76256d941acbe574ad2a33d8 (patch)
treefd3a29830e2ef50e4c373aa5aab2907e843b9e1e /meta/recipes-devtools/python/python
parent273af8144e05bcba20adad6cad3886bd97f7bbaf (diff)
downloadpoky-64ff0a5e6c76803e76256d941acbe574ad2a33d8.tar.gz
python: clean up ptest
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. (From OE-Core rev: 84f34ad223b1e3f36cab2ac12246eb90efc919bc) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python')
-rw-r--r--meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch34
-rw-r--r--meta/recipes-devtools/python/python/run-ptest4
2 files changed, 1 insertions, 37 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'