Re: [PATCH 2/2] runtest.sh: add automated mode
The default mode exits as soon as an error is found.
Automated mode will run the entire test suite to completion.
Some tests may be dependent on earlier tests being successful,
so keep that in mind when investigating failures in tests.
Signed-off-by: Jeffrey Bastian <jbastian@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
diff --git a/tests/runtest.sh b/tests/runtest.sh
index d87843f..b6eaa7c 100644
--- a/tests/runtest.sh
+++ b/tests/runtest.sh
@@ -1,5 +1,10 @@
#!/bin/bash
+# set the $AUTOMATED environment variable to non-zero for automated mode
+# automated mode will run all the tests to completion
+# non-automated mode (default) stops running the test suite on the first error
+AUTOMATED=${AUTOMATED:-0}
+
TESTS=$*
PARENTTEST=${TEST}
@@ -14,7 +19,11 @@
export TEST=$i
pushd $i >/dev/null
echo "### RUNNING TEST $i"
- bash ./runtest.sh || exit 1
+ if [[ $AUTOMATED != 0 ]] ; then
+ bash ./runtest.sh
+ else
+ bash ./runtest.sh || exit 1
+ fi
popd >/dev/null
done