[m-rev.] diff: avoid unnecessary NFS use in test scripts

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Feb 18 14:04:25 AEDT 2008


Estimated hours taken: 1
Branches: main

Change some of our test infrastructure to avoid using /home/mercury where possible.
This will mean that test runs can complete, even in situations where /home/mercury
becomes inaccessible.

tools/test_mercury:
 	Avoid (un)tagging the repository after each test run.
 	(If anyone wants to checkout the specific version used in a test run they
 	can do so using the start time which is recorded at the beginning of the log.)
 	This will prevent the situation that sometimes occurs now where multiple machines
 	tie up the repository because they are all trying to simultaneously (un)tag
 	it.

tools/run_all_tests_from_cron:
 	Write the of logs of the nightly tests to a local file system rather
 	than to /home/mercury.  (We will set up symbolic links from /home/mercury
 	to point to these logs.)

Julien.

Index: run_all_tests_from_cron
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/run_all_tests_from_cron,v
retrieving revision 1.82
diff -u -r1.82 run_all_tests_from_cron
--- run_all_tests_from_cron	6 Dec 2007 05:35:48 -0000	1.82
+++ run_all_tests_from_cron	18 Feb 2008 02:47:26 -0000
@@ -72,7 +72,7 @@
  # Redirect all output to $tmpfile to stop cron mailing
  # content-free messages to mercury at cs.mu.oz.au.
  {
-tm_dir=$TOPDIR/test_mercury
+tm_dir=$TOPDIR/test_mercury/test_dirs/$HOST

  [ -d $TOPDIR/test_mercury/scripts ] || mkdir -p $TOPDIR/test_mercury/scripts
  cd $TOPDIR/test_mercury/scripts
Index: test_mercury
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/test_mercury,v
retrieving revision 1.335
diff -u -r1.335 test_mercury
--- test_mercury	7 Feb 2008 01:08:39 -0000	1.335
+++ test_mercury	18 Feb 2008 02:47:26 -0000
@@ -1056,30 +1056,7 @@
  		rm -f $UNSTABLE/mercury-test-failures-$version.$fullname.txt
  	fi &&
  	mv mercury/mercury-$version.$fullarch.tar.gz \
-		$UNSTABLE/mercury-$version.$fullname.tar.gz &&
-	case "$CVSROOT" in
-	    :pserver:guest* | :pserver:anon*)
-		echo "Not tagging CVS repository" \
-			"(no write access for anonymous cvs)"
-		;;
-	    *)
-		echo "test_mercury tagging unstable $BASE_TAG_NAME," \
-			"starting at `date`" 1>&2 &&
-		cvs rtag -d unstable-$BASE_TAG_NAME-$fullname_tag \
-			mercury tests &&
-		cvs tag unstable-$BASE_TAG_NAME-$fullname_tag mercury tests &&
-		if [ -d gcc/. ] && [ -d mercury-gcc/. ]; then
-			cvs rtag -d unstable-$BASE_TAG_NAME-$fullname_tag \
-				mercury-gcc &&
-			cvs tag unstable-$BASE_TAG_NAME-$fullname_tag \
-				mercury-gcc
-		else 
-			true
-		fi &&
-		echo "test_mercury tagging unstable $BASE_TAG_NAME," \
-			"finished at `date`" 1>&2
-		;;
-	esac
+		$UNSTABLE/mercury-$version.$fullname.tar.gz
  } || set_status "creating binary distribution"

  case $status in
@@ -1099,29 +1076,7 @@
  	    rm -f \
  		$BETA_FTPDIR/mercury-$RELEASE_VERSION_PATTERN.$fullname.tar.gz \
  		$BETA_FTPDIR/mercury*-$RELEASE_VERSION_PATTERN.$fullname.txt" &&
-	scp $STABLE/mercury*-$version.$fullname.* $BETA_FTPHOST:$BETA_FTPDIR &&
-	case "$CVSROOT" in
-	    :pserver:guest* | :pserver:anon*)
-		echo "Not tagging CVS repository" \
-			"(no write access for anonymous cvs)"
-		;;
-	    *)
-		echo "test_mercury tagging stable $BASE_TAG_NAME," \
-			"starting at `date`" 1>&2 &&
-		cvs rtag -d stable-$BASE_TAG_NAME-$fullname_tag \
-			mercury tests &&
-		cvs tag stable-$BASE_TAG_NAME-$fullname_tag mercury tests &&
-		if [ -d gcc/. ] && [ -d mercury-gcc/. ]; then
-			cvs rtag -d stable-$BASE_TAG_NAME-$fullname_tag \
-				mercury-gcc &&
-			cvs tag stable-$BASE_TAG_NAME-$fullname_tag mercury-gcc
-		else 
-			true
-		fi &&
-		echo "test_mercury tagging stable $BASE_TAG_NAME," \
-			"finished at `date`" 1>&2
-		;;
-	esac
+	scp $STABLE/mercury*-$version.$fullname.* $BETA_FTPHOST:$BETA_FTPDIR
         } || set_status "copying binary distribution"
      ;;
  esac

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list