1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-02-09 17:57:24 +03:00

Make sure that Python tests exit with error code

Closes #108.
This commit is contained in:
Nick Wellnhofer 2019-10-21 12:44:59 +02:00
parent 55d95dcf17
commit d188eb921a

View File

@ -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