From 111c5f225945ef4d798f67be8c886430cdcaa834 Mon Sep 17 00:00:00 2001 From: Aharon Hillel Date: Tue, 20 Dec 2011 08:53:38 +0000 Subject: [PATCH] exactness: reteruning non-zero value on failure Signed-off-by: Aharon Hillel SVN revision: 66369 --- src/scripts/write.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/scripts/write.sh b/src/scripts/write.sh index dec1f50..150c6c3 100755 --- a/src/scripts/write.sh +++ b/src/scripts/write.sh @@ -332,6 +332,7 @@ then do_compare "\$*" fi +_n_tests_failed=0 if [ "\$_remove_fail" ] then ls fail_*.txt &> /dev/null @@ -346,6 +347,25 @@ then fi fi fi + +status=0 +# Compute exit code +if [ "\$nfail" -ne 0 ] +then + status=\$(( \$status | 1 )) +fi + +if [ "\$nerr" -ne 0 ] +then + status=\$(( \$status | 2 )) +fi + +if [ "\$_n_tests_failed" -ne 0 ] +then + status=\$(( \$status | 4 )) +fi + +exit \$status ENDOFMESSAGE chmod +x exactness