diff options
| author | Amitay Isaacs <amitay@ozlabs.org> | 2018-11-14 16:14:09 +1100 |
|---|---|---|
| committer | Alistair Popple <alistair@popple.id.au> | 2018-11-15 15:18:00 +1100 |
| commit | a952df67b90a22a565c12dbcae8197509a01348e (patch) | |
| tree | 24ce30f43571f8316087eb674f99bef0486ed151 | |
| parent | 9067b232acc3cf576615d1e393ab0fe96ce453a5 (diff) | |
| download | pdbg-a952df67b90a22a565c12dbcae8197509a01348e.tar.gz pdbg-a952df67b90a22a565c12dbcae8197509a01348e.zip | |
tests: Exit on first test failure
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
| -rw-r--r-- | tests/driver.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/driver.sh b/tests/driver.sh index 9e92135..f1f7612 100644 --- a/tests/driver.sh +++ b/tests/driver.sh @@ -90,6 +90,7 @@ test_name=${TEST_NAME:-$0} test_logfile=${TEST_LOG:-} test_trsfile=${TEST_TRS:-} test_color=${TEST_COLOR:-yes} +test_exit_failure=${TEST_EXIT_FAILURE:-yes} red= grn= lgn= blu= mgn= std= if [ $test_color = yes ] ; then @@ -216,6 +217,10 @@ test_output () elif [ $res = "XPASS" -o $res = "FAIL" ] ; then count_failed=$(( count_failed + 1 )) fi + + if [ $count_failed -gt 0 -a "$test_exit_failure" = "yes" ] ; then + exit 99 + fi } test_wrapper_default () |

