From c339185e3a0a73ed9f7b82fcde7258be38369aa6 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 30 Sep 2013 17:53:01 +0100 Subject: [PATCH 08/11] run-test.sh.in: improve output --- tests/twisted/run-test.sh.in | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/twisted/run-test.sh.in b/tests/twisted/run-test.sh.in index 56ade7b..ce66de2 100644 --- a/tests/twisted/run-test.sh.in +++ b/tests/twisted/run-test.sh.in @@ -82,8 +82,10 @@ else list=$(cat "${test_build}"/twisted/mc-twisted-tests.list) fi -any_failed=0 +n=0 +n_failed=0 for i in $list ; do + n=$(( $n + 1 )) echo "Testing $i ..." tmp="${MC_TEST_CURDIR}/tmp-`echo $i | tr ./ __`" @@ -136,16 +138,22 @@ for i in $list ; do fi ;; (*) - any_failed=1 + n_failed=$(( $n_failed + 1 )) echo "FAIL: $i ($e)" ( cd $tmp && for x in *.log; do echo "===== log file: $x =====" cat "$x" done + echo "===== end of log files for $i =====" ) ;; esac done -exit $any_failed +if test $n_failed != 0; then + echo "Tests run: $n; tests failed: $n_failed" + exit 1 +else + exit 0 +fi -- 1.8.4.rc3