/[MITgcm]/MITgcm_contrib/test_scripts/other/test_local
ViewVC logotype

Diff of /MITgcm_contrib/test_scripts/other/test_local

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.14 by jmc, Sun Jun 4 14:00:29 2023 UTC revision 1.18 by jmc, Sat Feb 3 16:43:07 2024 UTC
# Line 46  tmpFil="/tmp/"`basename $0`".$$" Line 46  tmpFil="/tmp/"`basename $0`".$$"
46  logFile='check_update.log'  logFile='check_update.log'
47  sendCmd='-a jm_c@mitgcm.org'  sendCmd='-a jm_c@mitgcm.org'
48  sendCmd='-send scp -a jm_c@mitgcm.org:testing/MITgcm-test'  sendCmd='-send scp -a jm_c@mitgcm.org:testing/MITgcm-test'
49    #- expect higher precision if test is run on reference platform+compiler:
50    MC=13
51    
52  echo "-- run: \""`basename $0` $*"\" on:" `date` >> $logFile  echo "-- run: \""`basename $0` $*"\" on:" `date` >> $logFile
53  gcmDIR="MITgcm"  gcmDIR="MITgcm"
54  if test -e $gcmDIR/.git/config ; then : else  if test -e $gcmDIR/.git/config ; then
55    echo " No current clone ==> get a fresh clone" >> $logFile    if test ! -f git_Hash ; then
56    if test -d $gcmDIR ; then /bin/rm -rf $gcmDIR ; fi      echo " Missing file "git_Hash" ==> make one from clone '${gcmDIR}'" >> $logFile
57    git clone https://github.com/$git_repo/${git_code}.git $gcmDIR      ( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash )
58    ( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash )    fi
59    else
60        echo " No current clone ==> get a fresh clone" >> $logFile
61        #rm -f git_Hash prevHash
62        if test -d $gcmDIR ; then /bin/rm -rf $gcmDIR ; fi
63        git clone https://github.com/$git_repo/${git_code}.git $gcmDIR
64        ( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash )
65  fi  fi
66    
67  #-------------------------------------------------------------------------------  #-------------------------------------------------------------------------------
68  #-- check particular set of tests:  #-- check particular set of tests:
69  if test $1 = tap ; then  if test $1 = tap ; then
70  #- Only run this pair of test if MITgcm code got updated:  #- Only run this pair of test if MITgcm code got updated:
71    if test -f prevHash ; then    if test -f git_Hash -a -f prevHash ; then
72     #ls -l prevHash  >> $logFile     #ls -l prevHash  >> $logFile
73      diff -q git_Hash prevHash > /dev/null 2>&1      diff -q git_Hash prevHash > /dev/null 2>&1
74      retv=$?      retv=$?
# Line 134  do Line 142  do
142    echo "=========================================================================="    echo "=========================================================================="
143  # set -x  # set -x
144    rm -f tr_clean_$tt.log    rm -f tr_clean_$tt.log
145    echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$?    echo $tt | grep '^.ad' > /dev/null 2>&1 ; taf=$?
146    echo $tt | grep '^tap' > /dev/null 2>&1 ; tap=$?    echo $tt | grep '^tap' > /dev/null 2>&1 ; tap=$?
147    if test $tt = g7a -o $tap = 0 ; then fwd=0 ; clOpt='-adm' ; fi    if test $tt = g7a ; then taf=0 ; fi
148    echo " testing tt= $tt , fwd= $fwd"    echo " testing tt= $tt , taf= $taf , tap= $tap"
149   if test -e $gcmDIR/.git/config -a -d $gcmDIR/verification ; then   if test -e $gcmDIR/.git/config -a -d $gcmDIR/verification ; then
150   #- cleaning previous testreport run and updating the code:   #- cleaning previous testreport run and updating the code:
151    if [ $fwd -eq 0 ] ; then    if [ $taf -eq 0 -o $tap -eq 0 ] ; then
152     if test $tt = 'tapAD' ; then clOpt='-tap -adm' ; fi     if test $tt = 'tapTL' ; then clOpt='-tlm' ; else clOpt='-adm' ; fi
153     if test $tt = 'tapTL' ; then clOpt='-tap -tlm' ; fi     if [ $tap -eq 0 ] ; then clOpt="-tap $clOpt" ; fi
154     set -x     set -x
155    #- cleanup previous test:    #- cleanup previous test:
156     ( cd $gcmDIR/verification ; ./testreport $clOpt -clean > ../../tr_clean_$tt.log 2>&1 )     ( cd $gcmDIR/verification ; ./testreport $clOpt -clean > ../../tr_clean_$tt.log 2>&1 )
# Line 302  case $tt in Line 310  case $tt in
310  'tapAD')  'tapAD')
311    
312    ./testreport -tap -adm -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -tap -adm -of ../tools/build_options/linux_amd64_gfortran \
313     $sendCmd >> ../../tr_run_$tt.log 2>&1     -match $MC $sendCmd >> ../../tr_run_$tt.log 2>&1
314    
315    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
316  ;;  ;;
# Line 310  case $tt in Line 318  case $tt in
318  'tapTL')  'tapTL')
319    
320    ./testreport -tap -tlm -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -tap -tlm -of ../tools/build_options/linux_amd64_gfortran \
321     $sendCmd >> ../../tr_run_$tt.log 2>&1     -match $MC $sendCmd >> ../../tr_run_$tt.log 2>&1
322    
323    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
324  ;;  ;;

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.22