[m-dev.] diff: include C compiler in test log file names

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Mar 6 06:09:52 AEDT 2001


Estimated hours taken: 0.5
Branches: main

tools/run_all_tests_from_cron:
tools/test_mercury:
	Include the C compiler name in the test log file names.

Workspace: /home/mercury/public/test_mercury/scripts/mercury
Index: tools/run_all_tests_from_cron
===================================================================
RCS file: /home/staff/zs/imp/mercury/tools/run_all_tests_from_cron,v
retrieving revision 1.26
diff -u -d -r1.26 run_all_tests_from_cron
--- tools/run_all_tests_from_cron	2001/03/01 11:59:18	1.26
+++ tools/run_all_tests_from_cron	2001/03/04 14:49:53
@@ -77,23 +77,27 @@
 
 echo run_test $HOST
 
-mv -f $tm_dir/logs/old/test_mercury_$HOST.out $tm_dir/logs/old2 2>/dev/null
-mv -f $tm_dir/logs/test_mercury_$HOST.out $tm_dir/logs/old 2>/dev/null
+case "$C_COMPILER" in
+	gcc)	logname="test_mercury_$HOST.out" ;;
+	*)	logname="test_mercury_$HOST-$C_COMPILER.out" ;;
+esac
 
+mv -f $tm_dir/logs/old/$logname $tm_dir/logs/old2 2>/dev/null
+mv -f $tm_dir/logs/$logname $tm_dir/logs/old 2>/dev/null
+logfile="$tm_dir/logs/$logname"
+
 tmpfile=/tmp/run_test$$
 trap 'rm -f $tmpfile $tmpscript; exit 1' 1 2 3 13 15
 {
-echo Subject: Mercury auto-test on $HOST
+echo "Subject: Mercury auto-test on $HOST (with $C_COMPILER)"
 echo
-logfile=$tm_dir/logs/test_mercury_$HOST.out
-
 if nice -5 sh $tmpscript $HOST $ARCH $FULLARCH $C_COMPILER \
 		> $logfile 2>&1
 then
 	echo test passed
 	echo
-	echo last 10 lines of log file:
-	tail -10 $logfile
+	echo last 20 lines of log file:
+	tail -20 $logfile
 	echo
 	case $HOST in
 		hg) base=/home/hg ;;
@@ -112,8 +116,8 @@
 	echo test FAILED
 	echo log file in $tm_dir/logs/test_mercury_$HOST.out
 	echo
-	echo last 10 lines of log file:
-	tail -10 $logfile
+	echo last 20 lines of log file:
+	tail -20 $logfile
 fi
 } > $tmpfile 2>&1
 # NB we can't just pipe into $mail, because $mail times out while
Index: tools/test_mercury
===================================================================
RCS file: /home/staff/zs/imp/mercury/tools/test_mercury,v
retrieving revision 1.143
diff -u -d -r1.143 test_mercury
--- tools/test_mercury	2001/03/02 03:51:21	1.143
+++ tools/test_mercury	2001/03/03 11:31:52
@@ -533,8 +533,18 @@
 
     [ -d $TESTDIR/logs ] || mkdir -p $TESTDIR/logs
     case $status in
-        0) date >> $TESTDIR/logs/install.$INSTALL_DIR_NAME.$HOST ;;
-        *) date >> $TESTDIR/logs/install-failed.$INSTALL_DIR_NAME.$HOST ;;
+        0) 
+	    case $C_COMPILER in
+	        gcc) date >> $TESTDIR/logs/install.$INSTALL_DIR_NAME.$HOST ;;
+	        *)   date >> $TESTDIR/logs/install.$INSTALL_DIR_NAME.$HOST-$C_COMPILER ;;
+	    esac
+	    ;;
+        *)
+	    case $C_COMPILER in
+	        gcc) date >> $TESTDIR/logs/install-failed.$INSTALL_DIR_NAME.$HOST ;;
+	        *)   date >> $TESTDIR/logs/install-failed.$INSTALL_DIR_NAME.$HOST-$C_COMPILER ;;
+	    esac
+	    ;;
     esac
 esac
 

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list