Message ID | 20181114051411.136488-4-amitay@ozlabs.org |
---|---|
State | Accepted |
Headers | show |
Series | Test framework improvements | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | master/apply_patch Successfully applied |
snowpatch_ozlabs/build-multiarch | success | Test build-multiarch on branch master |
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 ()
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> --- tests/driver.sh | 5 +++++ 1 file changed, 5 insertions(+)