diff options
author | Alberto <alberto.ruiz@codethink.co.uk> | 2011-10-03 15:29:29 +0100 |
---|---|---|
committer | Alberto <alberto.ruiz@codethink.co.uk> | 2011-10-03 15:29:29 +0100 |
commit | 7000a3a6909294aed8c3ad794edbdddc3261c45c (patch) | |
tree | 0a1c553d30217e4e4128a1d5bb7c6b29e3ddfa39 /tests/run_tests.sh | |
parent | 02203eb936986e6b6b0b366120c6b3407f37d91c (diff) | |
download | tbdiff-7000a3a6909294aed8c3ad794edbdddc3261c45c.tar.gz |
Improvements to the test framework and documentation
Diffstat (limited to 'tests/run_tests.sh')
-rwxr-xr-x | tests/run_tests.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 024351e..873d2eb 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -1,15 +1,27 @@ #!/bin/bash -if [ ! -f $TESTLIB ] +if [ ! -f run_tests.sh ] +then + echo "Test suite needs to be run from the tests directory" 1>&2 + exit 1 +fi + +if [ ! -f test_lib.sh ] then echo "Could not find test_lib.sh" 1>&2 + exit 1 fi +ALLTESTSDIR=`pwd` + for i in [0-9][0-9]* do - ./$i $1 $2 + cd $ALLTESTSDIR + ./$i ../tbdiff-create ../tbdiff-deploy if [ $? -ne 0 ] then + echo "Test program $i failed" 1>&2 + cd $ALLTESTSDIR exit 1 fi done |