From bd36966bed1d14461557973f91adf4f29bc92c08 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 27 Jan 2000 04:54:02 +0000 Subject: [PATCH] report exit code when failing a test --- test.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test.sh b/test.sh index 1717f4a5..792bb677 100755 --- 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})." + echo " FAILED (test # ${testnum} status=$status)." fi return 1 fi -- 2.34.1