X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/61153c284c832a0d0f7faecd9ad96f6cd9591c64..e9ecab0f97be19326c52f2afe04fd9b44eba01ae:/test/integration/run-tests diff --git a/test/integration/run-tests b/test/integration/run-tests index c7ea0a61a..edac07dbf 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -1,8 +1,27 @@ #!/bin/sh set -e +FAIL=0 DIR=$(readlink -f $(dirname $0)) +if [ "$1" = "-q" ]; then + export MSGLEVEL=2 +elif [ "$1" = "-v" ]; then + export MSGLEVEL=4 +fi for testcase in $(run-parts --list $DIR | grep '/test-'); do - echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m" - ${testcase} + if [ "$1" = "-q" ]; then + echo -n "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m" + else + echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m" + fi + if ! ${testcase}; then + FAIL=$((FAIL+1)) + echo "$(basename $testcase) ... FAIL" + fi + if [ "$1" = "-q" ]; then + echo + fi done + +echo "failures: $FAIL" +exit $FAIL