| 49 |
|
|
| 50 |
echo "-- run: \""`basename $0` $*"\" on:" `date` >> $logFile |
echo "-- run: \""`basename $0` $*"\" on:" `date` >> $logFile |
| 51 |
gcmDIR="MITgcm" |
gcmDIR="MITgcm" |
| 52 |
if test -e $gcmDIR/.git/config ; then : else |
if test -e $gcmDIR/.git/config ; then : ; else |
| 53 |
echo " No current clone ==> get a fresh clone" >> $logFile |
echo " No current clone ==> get a fresh clone" >> $logFile |
| 54 |
|
#rm -f git_Hash prevHash |
| 55 |
if test -d $gcmDIR ; then /bin/rm -rf $gcmDIR ; fi |
if test -d $gcmDIR ; then /bin/rm -rf $gcmDIR ; fi |
| 56 |
git clone https://github.com/$git_repo/${git_code}.git $gcmDIR |
git clone https://github.com/$git_repo/${git_code}.git $gcmDIR |
| 57 |
( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash ) |
( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash ) |
| 61 |
#-- check particular set of tests: |
#-- check particular set of tests: |
| 62 |
if test $1 = tap ; then |
if test $1 = tap ; then |
| 63 |
#- Only run this pair of test if MITgcm code got updated: |
#- Only run this pair of test if MITgcm code got updated: |
| 64 |
if test -f prevHash ; then |
if test -f git_Hash -a -f prevHash ; then |
| 65 |
#ls -l prevHash >> $logFile |
#ls -l prevHash >> $logFile |
| 66 |
diff -q git_Hash prevHash > /dev/null 2>&1 |
diff -q git_Hash prevHash > /dev/null 2>&1 |
| 67 |
retv=$? |
retv=$? |
| 137 |
rm -f tr_clean_$tt.log |
rm -f tr_clean_$tt.log |
| 138 |
echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$? |
echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$? |
| 139 |
echo $tt | grep '^tap' > /dev/null 2>&1 ; tap=$? |
echo $tt | grep '^tap' > /dev/null 2>&1 ; tap=$? |
| 140 |
if test $tt = g7a -o $tap = 0 ; then fwd=0 ; clOpt='-adm' ; fi |
if test $tt = g7a ; then fwd=0 ; fi |
| 141 |
echo " testing tt= $tt , fwd= $fwd" |
echo " testing tt= $tt , fwd= $fwd , tap= $tap" |
| 142 |
if test -e $gcmDIR/.git/config -a -d $gcmDIR/verification ; then |
if test -e $gcmDIR/.git/config -a -d $gcmDIR/verification ; then |
| 143 |
#- cleaning previous testreport run and updating the code: |
#- cleaning previous testreport run and updating the code: |
| 144 |
if [ $fwd -eq 0 ] ; then |
if [ $fwd -eq 0 -o $tap -eq 0 ] ; then |
| 145 |
if test $tt = 'tapAD' ; then clOpt='-tap -adm' ; fi |
if test $tt = 'tapTL' ; then clOpt='-tlm' ; else clOpt='-adm' ; fi |
| 146 |
if test $tt = 'tapTL' ; then clOpt='-tap -tlm' ; fi |
if [ $tap -eq 0 ] ; then clOpt="-tap $clOpt" ; fi |
| 147 |
set -x |
set -x |
| 148 |
#- cleanup previous test: |
#- cleanup previous test: |
| 149 |
( cd $gcmDIR/verification ; ./testreport $clOpt -clean > ../../tr_clean_$tt.log 2>&1 ) |
( cd $gcmDIR/verification ; ./testreport $clOpt -clean > ../../tr_clean_$tt.log 2>&1 ) |