summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch')
-rw-r--r--meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch86
1 files changed, 0 insertions, 86 deletions
diff --git a/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch b/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
deleted file mode 100644
index 6d9ede6194..0000000000
--- a/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1From ea1993d1d9a18c5e61b9cb271892b0a48f508d32 Mon Sep 17 00:00:00 2001
2From: Peter Kjellerstedt <pkj@axis.com>
3Date: Fri, 9 Jun 2017 17:50:46 +0200
4Subject: [PATCH] Make ptest run the python tests if python is enabled
5
6One of the tests (tstLastError.py) needed a minor correction. It might
7be due to the fact that the tests are forced to run with Python 3.
8
9Upstream-Status: Inappropriate [OE specific]
10Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
11---
12 Makefile.am | 2 +-
13 python/Makefile.am | 9 +++++++++
14 python/tests/Makefile.am | 10 ++++++++++
15 3 files changed, 20 insertions(+), 1 deletion(-)
16
17diff --git a/Makefile.am b/Makefile.am
18index b428452b..dc18d6dd 100644
19--- a/Makefile.am
20+++ b/Makefile.am
21@@ -203,9 +203,9 @@ install-ptest:
22 install $(check_PROGRAMS) $(DESTDIR))
23 cp -r $(srcdir)/test $(DESTDIR)
24 cp -r $(srcdir)/result $(DESTDIR)
25- cp -r $(srcdir)/python $(DESTDIR)
26 cp Makefile $(DESTDIR)
27 sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
28+ $(MAKE) -C python install-ptest
29
30 runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
31 testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
32diff --git a/python/Makefile.am b/python/Makefile.am
33index 34aed96c..ba3ec6a4 100644
34--- a/python/Makefile.am
35+++ b/python/Makefile.am
36@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
37
38 $(GENERATED): $(srcdir)/generator.py $(API_DESC)
39 $(PYTHON) $(srcdir)/generator.py $(srcdir)
40+
41+install-ptest:
42+ cp -r $(srcdir) $(DESTDIR)
43+ sed -e 's|^Makefile:|_Makefile:|' \
44+ -e 's|^\(tests test:\) all|\1|' Makefile >$(DESTDIR)/python/Makefile
45+ $(MAKE) -C tests install-ptest
46+else
47+install-ptest:
48 endif
49
50+.PHONY: tests test
51 tests test: all
52 cd tests && $(MAKE) tests
53diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
54index 227e24df..3568c2d2 100644
55--- a/python/tests/Makefile.am
56+++ b/python/tests/Makefile.am
57@@ -59,6 +59,11 @@ XMLS= \
58 CLEANFILES = core tmp.xml *.pyc
59
60 if WITH_PYTHON
61+install-ptest:
62+ cp -r $(srcdir) $(DESTDIR)/python
63+ sed -e 's|^Makefile:|_Makefile:|' \
64+ -e 's|^\(srcdir = \).*|\1.|' Makefile >$(DESTDIR)/python/tests/Makefile
65+
66 tests: $(PYTESTS)
67 @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
68 @echo "## running Python regression tests"
69@@ -70,9 +75,14 @@ tests: $(PYTESTS)
70 if [ "$$?" -ne 0 ] ; then \
71 echo "-- $$test" ; \
72 echo "$$log" ; \
73+ echo "FAIL: $$test"; \
74 exit 1 ; \
75+ else \
76+ echo "PASS: $$test"; \
77 fi ; \
78 done)
79 else
80+install-ptest:
81+
82 tests:
83 endif
84--
852.25.1
86