diff contrib/patch_tester.sh @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents a06113de4d67
children 04ced10e8804
line wrap: on
line diff
--- a/contrib/patch_tester.sh	Tue May 25 18:58:51 2010 +0900
+++ b/contrib/patch_tester.sh	Tue Mar 22 17:18:12 2011 +0900
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Tests a set of patches from a directory.
-# Copyright (C) 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2011  Free Software Foundation, Inc.
 # Contributed by Sebastian Pop <sebastian.pop@amd.com>
 
 # This program is free software; you can redistribute it and/or modify
@@ -36,13 +36,14 @@
 default_watermark=0.60
 watermark=$default_watermark
 savecompilers=false
+nopristinecache=false
 nogpg=false
 stop=false
 
 usage() {
     cat <<EOF
 patch_tester.sh [-j<N>] [-standby N] [-watermark N] [-savecompilers] [-nogpg]
-                [-svnpath URL] [-stop]
+                [-svnpath URL] [-stop] [-nopristinecache]
                 <source_dir> [patches_dir [state_dir [build_dir]]]
 
     J is the flag passed to make.  Default is empty string.
@@ -56,6 +57,12 @@
     SAVECOMPILERS copies the compilers in the same directory as the
     test results for the non patched version.  Default is not copy.
 
+    NOPRISTINECACHE prevents use of cached test results from any earlier
+    test runs on the pristine version of the branch and revision under
+    test (the default behaviour).  This should be used when testing the
+    same revision and patch with multiple sets of configure options, as
+    these may affect the set of baseline failures.
+
     NOGPG can be used to avoid checking the GPG signature of patches.
 
     URL is the location of the GCC SVN repository.  The default is
@@ -103,6 +110,9 @@
 	-savecompilers)
 	    savecompilers=true; shift
 	    ;;
+	-nopristinecache)
+	    nopristinecache=true; shift
+	    ;;
 	-nogpg)
 	    nogpg=true; shift
 	    ;;
@@ -366,6 +376,9 @@
     current_version=`svn info $SOURCE | grep "^Revision:" | sed -e "s/^Revision://g" -e "s/ //g"`
     PRISTINE=$STATE/$current_branch/$current_version
 
+    if [ $nopristinecache = true ]; then
+      rm -rf $PRISTINE
+    fi
     if [ -d $PRISTINE ]; then
 	ln -s $PRISTINE $TESTING/pristine
 	return 0