diff options
author | Jeffrey Bastian <jbastian@redhat.com> | 2015-10-01 12:06:56 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2015-12-21 15:52:15 +0000 |
commit | 76897bcabe41d67425f5b60655f79e8dd7e7dfca (patch) | |
tree | 167652d3eda208243e27171780ce333e0caf076b | |
parent | 1d8a71629c9fc1a4f61c7e1580d5b529e429a3a6 (diff) | |
download | keyutils-76897bcabe41d67425f5b60655f79e8dd7e7dfca.tar.gz |
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>
-rw-r--r-- | tests/runtest.sh | 11 |
1 files changed, 10 insertions, 1 deletions
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 @@ for i in ${TESTS}; do 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 |