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

Simon Taylor stayl at cs.mu.OZ.AU
Mon Aug 19 01:03:26 AEST 2002


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

tools/run_all_tests_from_cron:
	Only mail the log summaries if they are non-empty.	

Index: run_all_tests_from_cron
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/run_all_tests_from_cron,v
retrieving revision 1.50
diff -u -u -r1.50 run_all_tests_from_cron
--- run_all_tests_from_cron	17 Aug 2002 15:01:13 -0000	1.50
+++ run_all_tests_from_cron	18 Aug 2002 15:00:52 -0000
@@ -184,8 +184,8 @@
 	echo test failure summary in $logfile.test_errs
 fi
 
-if [ -f $logfile.errs -o -f $logfile.test_errs ]; then
-	if [ -f $logfile.errs ]; then
+if [ -s $logfile.errs -o -s $logfile.test_errs ]; then
+	if [ -s $logfile.errs ]; then
 		# Failures building the compiler or library should
 		# occur early in the log summary.
 		echo first 10 lines of log file summary:
@@ -193,7 +193,7 @@
 		echo
 		echo
 	fi
-	if [ -f $logfile.test_errs ]; then
+	if [ -s $logfile.test_errs ]; then
 		echo first 100 test failures:
 		grep "FAILED TEST" $logfile.test_errs | head - 100
 	fi
--------------------------------------------------------------------------
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