report exit code when failing a test
authorAndrew Tridgell <tridge@samba.org>
Thu, 27 Jan 2000 04:54:02 +0000 (04:54 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 27 Jan 2000 04:54:02 +0000 (04:54 +0000)
test.sh

diff --git a/test.sh b/test.sh
index 1717f4a..792bb67 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -67,8 +67,11 @@ checkit() {
   failed=
   echo "Running: \"$1\""  >${log}
   echo "">>${log}
-  eval "$1 || failed=YES"  >>${log} 2>&1
-
+  eval "$1"  >>${log} 2>&1
+  status=$?
+  if [ $status != 0 ]; then
+    failed="YES";
+  fi
   echo "-------------">>${log}
   echo "check how the files compare with diff:">>${log}
   echo "">>${log}
@@ -88,7 +91,7 @@ checkit() {
       cat ${log}
       rm ${log}
     else
-      echo "   FAILED (test # ${testnum}).\a"
+      echo "   FAILED (test # ${testnum} status=$status).\a"
     fi
     return 1
   fi