[m-rev.] for review: nightly test improvements

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Aug 2 19:27:10 AEST 2001


Estimated hours taken: 1
Branches: main

tools/test_mercury:
	Do `rm -rf' on the build directories before checking out the sources,
	to avoid leaving crud around from the previous time.

	Name the build directories based on the test_mercury options
	(branch name and C compiler).  This makes it easier to see what's
	going on when manually browsing through those directories, e.g.
	when investigating a test case failure.

	Don't bother to checkout the GCC 3.0 sources every time,
	to save bandwidth.

Workspace: /home/mercury/public/test_mercury/scripts/mercury
Index: tools/test_mercury
===================================================================
RCS file: /home/staff/zs/imp/mercury/tools/test_mercury,v
retrieving revision 1.156
diff -u -d -r1.156 test_mercury
--- tools/test_mercury	2001/08/02 08:46:25	1.156
+++ tools/test_mercury	2001/08/02 09:25:27
@@ -172,7 +172,8 @@
 # directories to use
 
 TESTDIR=/home/mercury/public/test_mercury
-DIR=$TESTDIR/test_dirs/$HOST
+HOSTDIR=$TESTDIR/test_dirs/$HOST
+DIR=$HOSTDIR/build.$BRANCH.$C_COMPILER
 
 case $HOST in
 	hg|ender|roy|venus|earth|mars) 	
@@ -190,8 +191,8 @@
 BETA_WEBDIR=/home/mercury5/installed_w3/download/files/beta-releases
 BETA_WEBDIR_TOP=/home/mercury5/installed_w3/download/files
 
-STABLE=$DIR/$INSTALL_DIR_NAME-stable
-UNSTABLE=$DIR/$INSTALL_DIR_NAME-unstable
+STABLE=$HOSTDIR/$INSTALL_DIR_NAME-stable
+UNSTABLE=$HOSTDIR/$INSTALL_DIR_NAME-unstable
 
 case $ARCH in
 	alpha)
@@ -270,9 +271,9 @@
 # to make sure we don't try to run two tests in parallel,
 # we use a lock file in the test directory
 
-lockfile=$DIR/lockfile
+lockfile=$HOSTDIR/lockfile
 if [ -f $lockfile ]; then
-	echo "Directory $DIR is locked:" 1>&2
+	echo "Directory $HOSTDIR is locked:" 1>&2
 	cat $lockfile 1>&2
 	echo "Perhaps the previous test is still running?" 1>&2
 	echo "(Remove $lockfile manually if necessary.)" 1>&2
@@ -364,6 +365,21 @@
 
 #-----------------------------------------------------------------------------#
 
+: clean up any directories from previous test runs
+
+cd $HOSTDIR
+rm -rf build.*/mercury
+rm -rf build.*/tests
+rm -rf build.*/mercury-cvs
+# Note that we do NOT want to clean out the GCC directory,
+# because checking out the GCC sources from the FSF's repository in
+# California takes a *long* time and a *lot* of network bandwidth,
+# and we're currently using a fixed snapshot anyway, so we don't
+# bother to check it out at all.
+### rm -rf build.*/gcc
+
+#-----------------------------------------------------------------------------#
+
 : checkout sources and run bootcheck
 
 echo "test_mercury starting cvs checkout at `date`" 1>&2
@@ -398,14 +414,14 @@
 		# Once it is done once, it will be saved in the user's
 		# ~/.cvspass file, so it doesn't need to be done again.
 		#
-		# XXX This should be commented out soon, to save bandwidth,
-		#     since currently we're using a fixed snapshot
-		#     (`-r gcc_3_0_release') anyway.
-		#     Eventually this should change to use
-		#     `-r gcc_latest_snapshot'.
-		date
-		cvs -d :pserver:anoncvs at gcc.gnu.org:/cvs/gcc -z 9 \
-		 	checkout -r gcc_3_0_release gcc || { false; exit 1; }
+		# This is commented out, to save bandwidth,
+		# since currently we're using a fixed snapshot
+		# (`-r gcc_3_0_release') anyway.
+		# Perhaps this should eventually change to use
+		# `-r gcc_latest_snapshot'.
+		#date
+		#cvs -d :pserver:anoncvs at gcc.gnu.org:/cvs/gcc -z 9 \
+		# 	checkout -r gcc_3_0_release gcc || { false; exit 1; }
 		date
 		# Link the Mercury gcc back-end interface sources
 		# into the appropriate place in the gcc sources
-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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