This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] contrib/patch_tester.sh, 2 of 7


This patch to contrib/patch_tester.sh allows specifying a different URL
for the GCC Subversion repository, which allows using a local copy of
that repository.

Sebastian, OK for trunk?

--- patch_tester.sh.1	2008-03-05 15:13:58.000000000 -0800
+++ patch_tester.sh	2008-03-05 15:29:23.000000000 -0800
@@ -29,6 +29,7 @@ EOF
 
 args=$@
 
+svnpath=svn://gcc.gnu.org/svn/gcc
 dashj=
 default_standby=1
 standby=$default_standby
@@ -40,6 +41,7 @@ nogpg=false
 usage() {
     cat <<EOF
 patch_tester.sh [-j<N>] [-standby N] [-watermark N] [-savecompilers] [-nogpg]
+                [-svnpath URL]
                 <source_dir> [patches_dir [state_dir [build_dir]]]
 
     J is the flag passed to make.  Default is empty string.
@@ -56,6 +58,9 @@ patch_tester.sh [-j<N>] [-standby N] [-w
 
     NOGPG can be used to avoid checking the GPG signature of patches.
 
+    URL is the location of the GCC SVN repository.  The default is
+    ${svnpath}.
+
     SOURCE_DIR is the directory containing GCC's toplevel configure.
 
     PATCHES_DIR is the directory containing the patches to be tested.
@@ -90,6 +95,9 @@ while [ $# -ne 0 ]; do
 	-nogpg)
 	    nogpg=true; shift
 	    ;;
+	-svnpath)
+	    svnpath=$2; shift; shift
+	    ;;
 	-*) 
 	    echo "Invalid option: $1"
 	    usage
@@ -129,7 +137,7 @@ fi
 [ -d $SOURCE ] || mkdir -p $SOURCE
 [ -f $SOURCE/config.guess ] || {
     cd $SOURCE
-    svn -q co svn://gcc.gnu.org/svn/gcc/trunk .
+    svn -q co $svnpath/trunk .
 }
 
 VERSION=`svn info $SOURCE | grep "^Revision:" | sed -e "s/^Revision://g" -e "s/ //g"`
@@ -200,15 +208,15 @@ update () {
     cd $SOURCE
     case $svn_branch in
 	trunk)
-	    if ! svn switch -r $svn_revision svn://gcc.gnu.org/svn/gcc/trunk &> $TESTING/svn ; then
+	    if ! svn switch -r $svn_revision $svnpath/trunk &> $TESTING/svn ; then
 		report "failed to update svn sources with"
-		report "svn switch -r $svn_revision svn://gcc.gnu.org/svn/gcc/trunk"
+		report "svn switch -r $svn_revision $svnpath/trunk"
 		freport $TESTING/svn
 		return 1
 	    fi
 	    ;;
 
-	svn://gcc.gnu.org/svn/gcc/*)
+	${svnpath}*)
 	    if ! svn switch -r $svn_revision $svn_branch &> $TESTING/svn ; then
 		report "failed to update svn sources with"
 		report "svn switch -r $svn_revision $svn_branch"
@@ -218,9 +226,9 @@ update () {
 	    ;;
 
 	*)
-	    if ! svn switch -r $svn_revision svn://gcc.gnu.org/svn/gcc/branches/$svn_branch &> $TESTING/svn ; then
+	    if ! svn switch -r $svn_revision $svnpath/branches/$svn_branch &> $TESTING/svn ; then
 		report "failed to update svn sources with"
-		report "svn switch -r $svn_revision svn://gcc.gnu.org/svn/gcc/branches/$svn_branch"
+		report "svn switch -r $svn_revision $svnpath/branches/$svn_branch"
 		freport $TESTING/svn
 		return 1
 	    fi
@@ -319,7 +327,7 @@ bootntest_patched () {
 # Build the pristine tree with exactly the same options as the patch under test.
 bootntest_pristine () {
     cleanup
-    current_branch=`svn info $SOURCE | grep "^URL:" | sed -e "s/URL: //g" -e "s/svn:\/\/gcc.gnu.org\/svn\/gcc\///g"`
+    current_branch=`svn info $SOURCE | grep "^URL:" | sed -e "s/URL: //g" -e "s,${svnpath},,g"`
     current_version=`svn info $SOURCE | grep "^Revision:" | sed -e "s/^Revision://g" -e "s/ //g"`
     PRISTINE=$STATE/$current_branch/$current_version
 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]