telepathy-gabble: run-test.sh.in: print pass/fail status

Simon McVittie smcv at kemper.freedesktop.org
Fri Sep 7 09:30:46 PDT 2012


Module: telepathy-gabble
Branch: master
Commit: 223a234ad1b30608b122670d8504d33fd6c05d42
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=223a234ad1b30608b122670d8504d33fd6c05d42

Author: Luis Araujo <luis.araujo at collabora.co.uk>
Date:   Fri Sep  7 17:12:47 2012 +0100

run-test.sh.in: print pass/fail status

Some automated testing frameworks, including LAVA, ignore exit status
and rely on screen-scraping results from log output. Use the Automake
convention here (each match of ^(PASS|FAIL|SKIP): (.*)$ is a test result).

[commit message added -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=52049

---

 tests/twisted/run-test.sh.in |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/run-test.sh.in b/tests/twisted/run-test.sh.in
index 6a4cc0f..6e8d576 100644
--- a/tests/twisted/run-test.sh.in
+++ b/tests/twisted/run-test.sh.in
@@ -15,11 +15,26 @@ else
   list=$(cat @gabbletestsdir@/twisted/gabble-twisted-tests.list)
 fi
 
-for i in $list ; do 
-  echo "Testing $i"
+any_failed=0
+for i in $list ; do
+  echo "Testing $i ..."
   sh @gabbletestsdir@/twisted/tools/with-session-bus.sh \
     --config-file=@gabbletestsdir@/twisted/tools/servicedir/tmp-session-bus.conf \
     -- \
     @PYTHON@ @gabbletestsdir@/twisted/$i
+    e=$?
+    case "$e" in
+        (0)
+            echo "PASS: $i"
+            ;;
+        (77)
+            echo "SKIP: $i"
+            ;;
+        (*)
+            any_failed=1
+            echo "FAIL: $i ($e)"
+            ;;
+    esac
 done
 
+exit $any_failed



More information about the telepathy-commits mailing list