/[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.13 by jmc, Wed May 31 13:51:39 2023 UTC revision 1.17 by jmc, Mon Oct 2 13:02:27 2023 UTC
# Line 43  ulimit -s unlimited Line 43  ulimit -s unlimited
43   #git_repo='altMITgcm'; #git_code='MITgcm66h'   #git_repo='altMITgcm'; #git_code='MITgcm66h'
44  #- other settings:  #- other settings:
45  tmpFil="/tmp/"`basename $0`".$$"  tmpFil="/tmp/"`basename $0`".$$"
46    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    
 gcmDIR="MITgcm"  
 logFile='check_update.log'  
52  echo "-- run: \""`basename $0` $*"\" on:" `date` >> $logFile  echo "-- run: \""`basename $0` $*"\" on:" `date` >> $logFile
53  if test -e $gcmDIR/.git/config -a -f git_Hash ; then  gcmDIR="MITgcm"
54    mv git_Hash prevHash  if test -e $gcmDIR/.git/config ; then : ; else
55    ( cd $gcmDIR ; git pull > /dev/null )    echo " No current clone ==> get a fresh clone" >> $logFile
56    ( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash )    #rm -f git_Hash prevHash
 else  
   echo " No current clone or missing file "git_Hash" ==> get a fresh clone" >> $logFile  
   rm -f prevHash  
57    if test -d $gcmDIR ; then /bin/rm -rf $gcmDIR ; fi    if test -d $gcmDIR ; then /bin/rm -rf $gcmDIR ; fi
58    git clone https://github.com/$git_repo/${git_code}.git $gcmDIR    git clone https://github.com/$git_repo/${git_code}.git $gcmDIR
59    ( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash )    ( cd $gcmDIR ; git rev-parse HEAD > ../git_Hash )
# Line 65  fi Line 63  fi
63  #-- check particular set of tests:  #-- check particular set of tests:
64  if test $1 = tap ; then  if test $1 = tap ; then
65  #- Only run this pair of test if MITgcm code got updated:  #- Only run this pair of test if MITgcm code got updated:
66    if test -f prevHash ; then    if test -f git_Hash -a -f prevHash ; then
67     #ls -l prevHash  >> $logFile     #ls -l prevHash  >> $logFile
68      diff -q git_Hash prevHash > /dev/null 2>&1      diff -q git_Hash prevHash > /dev/null 2>&1
69      retv=$?      retv=$?
# Line 82  if test $1 = tap ; then Line 80  if test $1 = tap ; then
80    else    else
81      echo " No file 'prevHash' --> will run '$1' set of tests" >> $logFile      echo " No file 'prevHash' --> will run '$1' set of tests" >> $logFile
82    fi    fi
83    elif test $1 = gfort ; then
84      #- to force to skip "tap" test while "gfort" is running:
85      if test -f prevHash ; then
86        cp -p prevHash git_Hash
87      else
88        cp -p git_Hash prevHash
89      fi
90  fi  fi
91    
92  echo "run: \""`basename $0` $*"\" on:" `date`  echo "run: \""`basename $0` $*"\" on:" `date`
# Line 103  gfort=1 Line 108  gfort=1
108  for tt in $tst_list  for tt in $tst_list
109  do  do
110    echo $tt | grep '^tap' > /dev/null 2>&1 ; retv=$?    echo $tt | grep '^tap' > /dev/null 2>&1 ; retv=$?
111    if [ $retv -ne 0 ] ; then    if [ $retv -ne 0 ] ; then
112      echo $tt | grep '^g' > /dev/null 2>&1 ; retv=$?      echo $tt | grep '^g' > /dev/null 2>&1 ; retv=$?
113    fi    fi
114    if   [ $retv -eq 0 -a $gfort -ge 1 ] ; then gfort=2    if   [ $retv -eq 0 -a $gfort -ge 1 ] ; then gfort=2
# Line 132  do Line 137  do
137    echo "=========================================================================="    echo "=========================================================================="
138  # set -x  # set -x
139    rm -f tr_clean_$tt.log    rm -f tr_clean_$tt.log
140    echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$?    echo $tt | grep '^.ad' > /dev/null 2>&1 ; taf=$?
141    echo $tt | grep '^tap' > /dev/null 2>&1 ; tap=$?    echo $tt | grep '^tap' > /dev/null 2>&1 ; tap=$?
142    if test $tt = g7a -o $tap = 0 ; then fwd=0 ; clOpt='-adm' ; fi    if test $tt = g7a ; then taf=0 ; fi
143    echo " testing tt= $tt , fwd= $fwd"    echo " testing tt= $tt , taf= $taf , tap= $tap"
144   if test -e $gcmDIR/.git/config -a -d $gcmDIR/verification ; then   if test -e $gcmDIR/.git/config -a -d $gcmDIR/verification ; then
145   #- cleaning previous testreport run and updating the code:   #- cleaning previous testreport run and updating the code:
146    if [ $fwd -eq 0 ] ; then    if [ $taf -eq 0 -o $tap -eq 0 ] ; then
147     if test $tt = 'tapAD' ; then clOpt='-tap -adm' ; fi     if test $tt = 'tapTL' ; then clOpt='-tlm' ; else clOpt='-adm' ; fi
148     if test $tt = 'tapTL' ; then clOpt='-tap -tlm' ; fi     if [ $tap -eq 0 ] ; then clOpt="-tap $clOpt" ; fi
149     set -x     set -x
150    #- cleanup previous test:    #- cleanup previous test:
151     ( 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 300  case $tt in Line 305  case $tt in
305  'tapAD')  'tapAD')
306    
307    ./testreport -tap -adm -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -tap -adm -of ../tools/build_options/linux_amd64_gfortran \
308     $sendCmd >> ../../tr_run_$tt.log 2>&1     -match $MC $sendCmd >> ../../tr_run_$tt.log 2>&1
309    
310    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
311  ;;  ;;
# Line 308  case $tt in Line 313  case $tt in
313  'tapTL')  'tapTL')
314    
315    ./testreport -tap -tlm -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -tap -tlm -of ../tools/build_options/linux_amd64_gfortran \
316     $sendCmd >> ../../tr_run_$tt.log 2>&1     -match $MC $sendCmd >> ../../tr_run_$tt.log 2>&1
317    
318    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
319  ;;  ;;
# Line 415  esac Line 420  esac
420   fi   fi
421    
422  done  done
423    
424    if test $1 = gfort ; then
425      day=`date +%d`
426      echo " day in the month='${day}'"
427      if test $day = 01 -a -f git_Hash ; then
428        ls -l git_Hash
429        echo -n ' git_Hash: '
430        cat git_Hash
431        echo "Remove file 'git_Hash' to force tomorrow 'tap' testing"
432        rm -f git_Hash
433      fi
434    fi

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.22