summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
blob: 60d782cd26b70657267c5d3c1e526e5e4e95074a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
OpenPOWER on IntegriCloud