diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-09-10 15:50:17 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-11-08 10:51:02 +0100 |
| commit | 56d088ba0b475dda575a9bd51ffaa36c675f6015 (patch) | |
| tree | 654312a4e1c0bfde9016d5a323f4bb08e778e404 /validation/test-suite | |
| parent | 943e80b278cc385490d0aa5071d8d5b8622d1e1f (diff) | |
| download | sparse-dev-56d088ba0b475dda575a9bd51ffaa36c675f6015.tar.gz | |
testsuite: add support for -a|--abort
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/test-suite')
| -rwxr-xr-x | validation/test-suite | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/validation/test-suite b/validation/test-suite index a1cc3acf..9cff68d5 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -32,6 +32,7 @@ known_ko_tests=0 # defaults to not verbose [ -z "$V" ] && V=0 vquiet="" +abort=0 ## # get_tag_value(file) - get the 'check-<...>' tags & values @@ -204,6 +205,7 @@ echo "$prog_name - a tiny automatic testing script" echo "Usage: $prog_name [option(s)] [command] [arguments]" echo echo "options:" +echo " -a|--abort abort the tests as soon as one fails" echo " -q|--quiet be extra quiet while running the tests" echo echo "commands:" @@ -344,6 +346,7 @@ do_test() fi if [ "$test_failed" -ne "$must_fail" ]; then + [ $abort -eq 1 ] && exit 1 test_failed=1 failed=1 fi @@ -437,6 +440,11 @@ arg_file() while true; do case "$1" in + -a|--abort) + abort=1 + shift + continue + ;; -q|--quiet) vquiet=1 shift |
