summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2019-10-21 11:57:47 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2019-10-21 12:52:41 +0200
commit47c8300023b7fb387cbb65d90d7153b4cb907484 (patch)
tree66f814cf4eb8645ec70dd8a31ce7fdaf68cdfe10
parent9d4bfeecbdf28f3980b23fa8f2504bdf54f04486 (diff)
downloadlibxslt-47c8300023b7fb387cbb65d90d7153b4cb907484.tar.gz
Make sure that Python tests exit with error code
-rw-r--r--python/tests/Makefile.am11
-rwxr-xr-xpython/tests/basic.py1
-rwxr-xr-xpython/tests/exslt.py1
-rw-r--r--python/tests/extelem.py1
-rwxr-xr-xpython/tests/extfunc.py1
5 files changed, 12 insertions, 3 deletions
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
index f757774f..cb186745 100644
--- a/python/tests/Makefile.am
+++ b/python/tests/Makefile.am
@@ -19,10 +19,15 @@ CLEANFILES = *.pyc core
if WITH_PYTHON
tests: $(TESTSPY)
- -@(PYTHONPATH="`pwd`/..:`pwd`/../.libs:$(srcdir)/.."; \
- if test "x$(LIBXML_SRC)" != "x" ; then PYTHONPATH="$$PYTHONPATH:$(LIBXML_SRC)/python:$(LIBXML_SRC)/python/.libs"; fi; \
+ @(PYTHONPATH="`pwd`/..:`pwd`/../.libs:$(srcdir)/.."; \
+ if test "x$(LIBXML_SRC)" != "x" ; then \
+ PYTHONPATH="$$PYTHONPATH:$(LIBXML_SRC)/python:$(LIBXML_SRC)/python/.libs"; \
+ fi; \
export PYTHONPATH; \
- for test in $(TESTSPY) ; do echo "-- $$test" ; (cd $(srcdir) && $(PYTHON) $$test ); done)
+ for test in $(TESTSPY) ; do \
+ echo "-- $$test" ; \
+ (cd $(srcdir) && $(PYTHON) $$test ) || exit 1; \
+ done)
else
tests:
endif
diff --git a/python/tests/basic.py b/python/tests/basic.py
index 89a57ac1..4a60590b 100755
--- a/python/tests/basic.py
+++ b/python/tests/basic.py
@@ -27,3 +27,4 @@ if libxml2.debugMemory(1) == 0:
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
+ sys.exit(255)
diff --git a/python/tests/exslt.py b/python/tests/exslt.py
index c64b2e43..c7333efb 100755
--- a/python/tests/exslt.py
+++ b/python/tests/exslt.py
@@ -54,3 +54,4 @@ if libxml2.debugMemory(1) == 0:
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
+ sys.exit(255)
diff --git a/python/tests/extelem.py b/python/tests/extelem.py
index 3364d01a..16635174 100644
--- a/python/tests/extelem.py
+++ b/python/tests/extelem.py
@@ -87,3 +87,4 @@ if libxml2.debugMemory(1) == 0:
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
+ sys.exit(255)
diff --git a/python/tests/extfunc.py b/python/tests/extfunc.py
index 0a559531..fc6040b3 100755
--- a/python/tests/extfunc.py
+++ b/python/tests/extfunc.py
@@ -64,3 +64,4 @@ if libxml2.debugMemory(1) == 0:
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
+ sys.exit(255)