Commit 7b0c9a8d authored by Jeremy C. Reed's avatar Jeremy C. Reed
Browse files

For python (and shell scripts) tests exit on script failure

instead of continuing to next test script.

For ticket #316: "make check continues even if check-local intermediate
test case fails"

Merged from branches/trac316.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2799 e5f2f494-b856-4b98-b285-d166d9295462
parents 35433512 054dceda
......@@ -8,5 +8,5 @@ check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/bin/bind10 \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -8,5 +8,5 @@ check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_srcdir)/src/bin \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -9,5 +9,5 @@ check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/bin/cfgmgr \
$(PYCOVERAGE) $(abs_builddir)/$$pytest ; \
$(PYCOVERAGE) $(abs_builddir)/$$pytest || exit ; \
done
......@@ -10,5 +10,5 @@ check-local:
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/bin/cmdctl \
CMDCTL_SPEC_PATH=$(abs_top_builddir)/src/bin/cmdctl \
CMDCTL_SRC_PATH=$(abs_top_srcdir)/src/bin/cmdctl \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -21,5 +21,5 @@ check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/bin/loadzone \
$(SHELL) $(abs_builddir)/$$pytest ; \
$(SHELL) $(abs_builddir)/$$pytest || exit ; \
done
......@@ -21,5 +21,5 @@ check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/bin/loadzone \
$(SHELL) $(abs_builddir)/$$pytest ; \
$(SHELL) $(abs_builddir)/$$pytest || exit ; \
done
......@@ -8,6 +8,6 @@ check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_builddir)/src/bin/msgq:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -16,5 +16,5 @@ check-local:
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_builddir)/src/lib/dns/python/.libs:$(abs_top_builddir)/src/bin/xfrin:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python \
$(LIBRARY_PATH_PLACEHOLDER) \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -16,5 +16,5 @@ check-local:
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_builddir)/src/bin/xfrout:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/python/.libs:$(abs_top_builddir)/src/lib/xfr/.libs \
$(LIBRARY_PATH_PLACEHOLDER) \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -8,5 +8,5 @@ check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_builddir)/src/bin/zonemgr:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/dns/python/.libs:$(abs_top_builddir)/src/lib/xfr/.libs \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -26,5 +26,5 @@ check-local:
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/python/.libs \
TESTDATA_PATH=$(abs_top_srcdir)/src/lib/dns/tests/testdata \
$(LIBRARY_PATH_PLACEHOLDER) \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -12,5 +12,5 @@ check-local:
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python \
BIND10_TEST_SOCKET_FILE=$(builddir)/test_socket.sock \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -7,12 +7,10 @@ EXTRA_DIST += unittest_fakesession.py
PYCOVERAGE = $(PYTHON)
# test using command-line arguments, so use check-local target instead of TESTS
check-local:
ret=0 ; \
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python \
CONFIG_TESTDATA_PATH=$(abs_top_srcdir)/src/lib/config/testdata \
CONFIG_WR_TESTDATA_PATH=$(abs_top_builddir)/src/lib/config/testdata \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || ret=1; \
done; \
exit $$ret
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -8,5 +8,5 @@ check-local:
for pytest in $(PYTESTS) ; do \
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/python/isc/log \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
......@@ -16,5 +16,5 @@ check-local:
echo Running test: $$pytest ; \
env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/python/.libs \
$(LIBRARY_PATH_PLACEHOLDER) \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest ; \
$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment