[m-rev.] for review: improve test framework

Simon Taylor stayl at cs.mu.OZ.AU
Wed Aug 21 18:09:13 AEST 2002


On 18-Aug-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
Estimated hours taken: 0.25

tools/run_all_tests_from_cron:
	Fix another inverted test.

Index: run_all_tests_from_cron
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/run_all_tests_from_cron,v
retrieving revision 1.51
diff -u -u -r1.51 run_all_tests_from_cron
--- run_all_tests_from_cron	18 Aug 2002 15:02:21 -0000	1.51
+++ run_all_tests_from_cron	21 Aug 2002 08:07:44 -0000
@@ -155,7 +155,7 @@
 		rm -f $logfile.errs
 		echo "test passed"
 	fi
-	if [ ! -s $logfile.test_errs ]; then
+	if [ -s $logfile.test_errs ]; then
 		test_status="FAILED"
 		echo "Error: test passed but $logfile.test_errs not empty"
 	else
@@ -181,7 +181,9 @@
 	echo test FAILED
 	echo log file in $logfile
 	echo log file summary in $logfile.errs
-	echo test failure summary in $logfile.test_errs
+	if [ -s $logfile.test_errs ]; then
+		echo test failure summary in $logfile.test_errs
+	fi
 fi
 
 if [ -s $logfile.errs -o -s $logfile.test_errs ]; then
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list