From f9c2481fab0ecae1c044b854b086f2236c9d2c79 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 3 Dec 2012 09:07:02 +0100 Subject: [PATCH] Ensure proper exit code on any test failure. See #1611 Uses a shell script to run the tests. --- Makefile | 9 +-------- run_tests | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) create mode 100755 run_tests diff --git a/Makefile b/Makefile index b98d0d993..d78565e04 100755 --- a/Makefile +++ b/Makefile @@ -29,14 +29,7 @@ uninstall: python scons/scons.py --config=cache --implicit-cache --max-drift=1 uninstall test: - @echo "*** Running visual tests..." - @python tests/visual_tests/test.py -q || true - @echo "*** Running C++ tests..." - @for FILE in tests/cpp_tests/*-bin; do \ - $${FILE}; \ - done - @echo "*** Running python tests..." - @python tests/run_tests.py -q + ./run_tests test-local: @echo "*** Boostrapping local test environment..." diff --git a/run_tests b/run_tests new file mode 100755 index 000000000..329c8e70d --- /dev/null +++ b/run_tests @@ -0,0 +1,19 @@ +#!/bin/sh + +failures=0 + +echo "*** Running visual tests..." +python tests/visual_tests/test.py -q +failures=$((failures+$?)) + +echo "*** Running C++ tests..." +for FILE in tests/cpp_tests/*-bin; do + ${FILE}; + failures=$((failures+$?)) +done + +echo "*** Running python tests..." +python tests/run_tests.py -q +failures=$((failures+$?)) + +exit $failures