[libxml2] Make sure that Python tests exit with error code
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Make sure that Python tests exit with error code
- Date: Mon, 21 Oct 2019 11:02:59 +0000 (UTC)
commit d188eb921a835e0ec40f0d9b974c27f7abf4fbc0
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Mon Oct 21 12:44:59 2019 +0200
Make sure that Python tests exit with error code
Closes #108.
python/tests/Makefile.am | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
index d44101c3..227e24df 100644
--- a/python/tests/Makefile.am
+++ b/python/tests/Makefile.am
@@ -62,15 +62,17 @@ if WITH_PYTHON
tests: $(PYTESTS)
@for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
@echo "## running Python regression tests"
- -@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
- export PYTHONPATH; \
- LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
- export LD_LIBRARY_PATH; \
- export PATH="$(top_builddir)/.libs:$$PATH" ; \
- for test in $(PYTESTS) ; \
- do log=`$(PYTHON) $(srcdir)/$$test` ; \
- if [ "`echo $$log | grep OK`" = "" ] ; then \
- echo "-- $$test" ; echo "$$log" ; fi ; done)
+ @(export PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
+ export LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export PATH="$(top_builddir)/.libs:$$PATH" ; \
+ for test in $(PYTESTS) ; do \
+ log=`$(PYTHON) $(srcdir)/$$test` ; \
+ if [ "$$?" -ne 0 ] ; then \
+ echo "-- $$test" ; \
+ echo "$$log" ; \
+ exit 1 ; \
+ fi ; \
+ done)
else
tests:
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]