Mercurial > hg > CbC > CbC_gcc
comparison 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 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Tests a set of patches from a directory. | 3 # Tests a set of patches from a directory. |
4 # Copyright (C) 2007, 2008 Free Software Foundation, Inc. | 4 # Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc. |
5 # Contributed by Sebastian Pop <sebastian.pop@amd.com> | 5 # Contributed by Sebastian Pop <sebastian.pop@amd.com> |
6 | 6 |
7 # This program is free software; you can redistribute it and/or modify | 7 # This program is free software; you can redistribute it and/or modify |
8 # it under the terms of the GNU General Public License as published by | 8 # it under the terms of the GNU General Public License as published by |
9 # the Free Software Foundation; either version 3 of the License, or | 9 # the Free Software Foundation; either version 3 of the License, or |
34 default_standby=1 | 34 default_standby=1 |
35 standby=$default_standby | 35 standby=$default_standby |
36 default_watermark=0.60 | 36 default_watermark=0.60 |
37 watermark=$default_watermark | 37 watermark=$default_watermark |
38 savecompilers=false | 38 savecompilers=false |
39 nopristinecache=false | |
39 nogpg=false | 40 nogpg=false |
40 stop=false | 41 stop=false |
41 | 42 |
42 usage() { | 43 usage() { |
43 cat <<EOF | 44 cat <<EOF |
44 patch_tester.sh [-j<N>] [-standby N] [-watermark N] [-savecompilers] [-nogpg] | 45 patch_tester.sh [-j<N>] [-standby N] [-watermark N] [-savecompilers] [-nogpg] |
45 [-svnpath URL] [-stop] | 46 [-svnpath URL] [-stop] [-nopristinecache] |
46 <source_dir> [patches_dir [state_dir [build_dir]]] | 47 <source_dir> [patches_dir [state_dir [build_dir]]] |
47 | 48 |
48 J is the flag passed to make. Default is empty string. | 49 J is the flag passed to make. Default is empty string. |
49 | 50 |
50 STANDBY is the number of minutes between checks for new patches in | 51 STANDBY is the number of minutes between checks for new patches in |
53 WATERMARK is the 5 minute average system charge under which a new | 54 WATERMARK is the 5 minute average system charge under which a new |
54 compile can start. Default is ${default_watermark}. | 55 compile can start. Default is ${default_watermark}. |
55 | 56 |
56 SAVECOMPILERS copies the compilers in the same directory as the | 57 SAVECOMPILERS copies the compilers in the same directory as the |
57 test results for the non patched version. Default is not copy. | 58 test results for the non patched version. Default is not copy. |
59 | |
60 NOPRISTINECACHE prevents use of cached test results from any earlier | |
61 test runs on the pristine version of the branch and revision under | |
62 test (the default behaviour). This should be used when testing the | |
63 same revision and patch with multiple sets of configure options, as | |
64 these may affect the set of baseline failures. | |
58 | 65 |
59 NOGPG can be used to avoid checking the GPG signature of patches. | 66 NOGPG can be used to avoid checking the GPG signature of patches. |
60 | 67 |
61 URL is the location of the GCC SVN repository. The default is | 68 URL is the location of the GCC SVN repository. The default is |
62 ${svnpath}. | 69 ${svnpath}. |
100 [[ $# > 2 ]] || usage | 107 [[ $# > 2 ]] || usage |
101 watermark=$2; shift; shift | 108 watermark=$2; shift; shift |
102 ;; | 109 ;; |
103 -savecompilers) | 110 -savecompilers) |
104 savecompilers=true; shift | 111 savecompilers=true; shift |
112 ;; | |
113 -nopristinecache) | |
114 nopristinecache=true; shift | |
105 ;; | 115 ;; |
106 -nogpg) | 116 -nogpg) |
107 nogpg=true; shift | 117 nogpg=true; shift |
108 ;; | 118 ;; |
109 -stop) | 119 -stop) |
364 cleanup | 374 cleanup |
365 current_branch=`svn info $SOURCE | grep "^URL:" | sed -e "s/URL: //g" -e "s,${svnpath},,g"` | 375 current_branch=`svn info $SOURCE | grep "^URL:" | sed -e "s/URL: //g" -e "s,${svnpath},,g"` |
366 current_version=`svn info $SOURCE | grep "^Revision:" | sed -e "s/^Revision://g" -e "s/ //g"` | 376 current_version=`svn info $SOURCE | grep "^Revision:" | sed -e "s/^Revision://g" -e "s/ //g"` |
367 PRISTINE=$STATE/$current_branch/$current_version | 377 PRISTINE=$STATE/$current_branch/$current_version |
368 | 378 |
379 if [ $nopristinecache = true ]; then | |
380 rm -rf $PRISTINE | |
381 fi | |
369 if [ -d $PRISTINE ]; then | 382 if [ -d $PRISTINE ]; then |
370 ln -s $PRISTINE $TESTING/pristine | 383 ln -s $PRISTINE $TESTING/pristine |
371 return 0 | 384 return 0 |
372 else | 385 else |
373 mkdir -p $PRISTINE | 386 mkdir -p $PRISTINE |