[m-rev.] diff: tools/test_mercury: fixes for new hosts

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Oct 3 11:30:46 AEST 2002


Branches: main
Estimated hours taken: 8 (about 0.25 to fix plus lots of testing time)

tools/test_mercury:
	Fix a couple of problems with testing on new hosts:
	- cd to the right directory before invoking `mmake echo_libgrades'
	- don't try to tag the repository if the sources were checked out
	  with anonymous CVS, since the attempt would fail due to lack
	  of write access.

Workspace: /mnt/mars/home/mars/fjh/ws4/mercury
Index: tools/test_mercury
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/test_mercury,v
retrieving revision 1.205
diff -u -d -r1.205 test_mercury
--- tools/test_mercury	1 Oct 2002 13:39:32 -0000	1.205
+++ tools/test_mercury	3 Oct 2002 01:20:33 -0000
@@ -935,7 +935,7 @@
 		#	asm_fast.gc.memprof asm_fast.gc.tr"
 		;;
 	*)
-		GRADES="`mmake echo_libgrades`"
+		GRADES="`(cd $DIR/mercury && mmake echo_libgrades)`"
 		;;
 esac
 
@@ -1161,16 +1161,29 @@
 	fi &&
 	mv mercury/mercury-$version.$fullarch.tar.gz \
 		$UNSTABLE/mercury-$version.$fullname.tar.gz &&
-	echo "test_mercury tagging unstable $BASE_TAG_NAME, starting at `date`" 1>&2 &&
-	cvs rtag -d unstable-$BASE_TAG_NAME-$fullname_tag mercury clpr 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
+	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 clpr 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
 } || set_status "creating binary distribution"
 
 case $status in
@@ -1189,16 +1202,28 @@
 		$BETA_FTPDIR/mercury-$RELEASE_VERSION_PATTERN.$fullname.tar.gz \
 		$BETA_FTPDIR/mercury-$RELEASE_VERSION_PATTERN.$fullname.txt" &&
 	rcp $STABLE/mercury*-$version.$fullname.* $BETA_FTPHOST:$BETA_FTPDIR &&
-	echo "test_mercury tagging stable $BASE_TAG_NAME, starting at `date`" 1>&2 &&
-	cvs rtag -d stable-$BASE_TAG_NAME-$fullname_tag mercury clpr 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
+	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 clpr 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
        } || set_status "copying binary distribution"
     ;;
 esac

-- 
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