summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/run-wsdunit2
-rwxr-xr-xtest/run_unit.sh.in8
-rwxr-xr-xtest/run_unit_standalone.sh.in2
3 files changed, 9 insertions, 3 deletions
diff --git a/scripts/run-wsdunit b/scripts/run-wsdunit
index b0f0eab9ca..9e529b7033 100755
--- a/scripts/run-wsdunit
+++ b/scripts/run-wsdunit
@@ -35,7 +35,7 @@ do
echo ">>> $(date +%b-%d) @ $(date +%H:%M:%S) Run #$i (of $limit):";
./coolwsd --disable-cool-user-checking --cleanup &> /dev/null
(cd test && ./run_unit.sh --test-name $name.la --log-file $name.log --trs-file $name.trs --color-tests yes --enable-hard-errors yes --expect-failure no -- ./$name.la)
- if test $? -eq 0; then
+ if test $? -eq 0 && grep -q PASS test/$name.trs; then
((pass=pass+1));
fi;
echo;
diff --git a/test/run_unit.sh.in b/test/run_unit.sh.in
index 0d4654b5c0..10ee948de9 100755
--- a/test/run_unit.sh.in
+++ b/test/run_unit.sh.in
@@ -20,6 +20,7 @@ lo_path="@LO_PATH@"
valgrind_cmd="valgrind --tool=memcheck --trace-children=no -v --read-var-info=yes"
verbose=''
capabilities="@ENABLE_SETCAP@"
+fail_fast=''
if test "h$capabilities" != "htrue"; then
capabilities=false
@@ -38,6 +39,7 @@ print_help ()
echo " --trs-file <file> Records the results of a test for automake (default /dev/stderr)"
echo " --gdb Run under gdb if enabled"
echo " --valgrind Run under valgrind if enabled"
+ echo " --fail-fast If a test fails, subsequent tests will not run and no report is generated"
echo " --verbose Print out more stuff - if you run out of things to read"
exit 1
}
@@ -52,6 +54,7 @@ while test $# -gt 0; do
--trs-file) test_output=$2; shift;;
--gdb) trace='gdb --args'; shift;;
--valgrind) trace=$valgrind_cmd; shift;;
+ --fail-fast) fail_fast='true'; shift;;
--verbose) verbose="--verbose";;
--help) print_help ;;
-*) ;; # ignore
@@ -114,6 +117,9 @@ else
echo "============================================================="
echo ":test-result: FAIL $tst" >> $test_output
fi
-exit 1
+
+if test "z$fail_fast" == "ztrue"; then
+ exit 1
+fi
# vim:set shiftwidth=4 expandtab:
diff --git a/test/run_unit_standalone.sh.in b/test/run_unit_standalone.sh.in
index ef80cb6efd..01084dbf1e 100755
--- a/test/run_unit_standalone.sh.in
+++ b/test/run_unit_standalone.sh.in
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# DO NOT EDIT - this file is generated from run_unit.sh.in.
+# DO NOT EDIT - this file is generated from run_unit_standalone.sh.in.
#
cmd_line="$0 $@"