[next] telepathy-mission-control: run-test.sh.in: improve output

Simon McVittie smcv at kemper.freedesktop.org
Fri Oct 4 06:00:39 PDT 2013


Module: telepathy-mission-control
Branch: next
Commit: 58501c9268a619b2a16ea82c2b3817d4c16d544b
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=58501c9268a619b2a16ea82c2b3817d4c16d544b

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Mon Sep 30 17:53:01 2013 +0100

run-test.sh.in: improve output

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69885
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>

---

 tests/twisted/run-test.sh.in |   14 +++++++++++---
 1 files 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



More information about the telepathy-commits mailing list