Changeset 11493


Ignore:
Timestamp:
2019-09-02T20:03:21+02:00 (13 months ago)
Author:
smueller
Message:

Revision of the method for determining the test revision in the identictest test to bring it in line with the method used in other tests (ticket #2302)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/CI/fix_ticket2302_sette/sette_rpt.sh

    r11492 r11493  
    1515    dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    1616    dorv=`echo $dorv | sed -e 's:.*/::'` 
     17    dorv2=`ls -1rt $vdir/$nam2/$mach/ | tail -1l ` 
     18    dorv2=`echo $dorv2 | sed -e 's:.*/::'` 
    1719  else 
    1820    dorv=$lastchange 
     21    dorv2=$lastchange 
    1922  fi 
    2023} 
     
    364367function identictest(){ 
    365368# 
    366 #  checks AGRIF does not corrupe results with no AGRIF zoom. Expects ORCA2AGUL/AGRIFNOZ and ORCA2AGUL_NAGR/AGRIFNO  run directories 
    367 # Compares solver.stat files for each 
     369# Checks AGRIF does not corrupt results with no AGRIF zoom by comparing run.stat files 
    368370# 
    369371  vdir=$1 
    370   dir1=$2 
    371   dir2=$3 
     372  nam=$2 
     373  nam2=$3 
    372374  pass=$4 
    373375# 
    374   if [ -d $vdir/$dir1 ] && [ -d $vdir/$dir2 ]; then 
    375     dorv1=`ls -1rt $vdir/$dir1/$mach/ | tail -1l ` 
    376     dorv1=`echo $dorv1 | sed -e 's:.*/::'` 
    377     dorv2=`ls -1rt $vdir/$dir2/$mach/ | tail -1l ` 
    378     dorv2=`echo $dorv2 | sed -e 's:.*/::'` 
    379  
    380     rep1=`ls -1rt $vdir/$dir1/$mach/$dorv1/ |  tail -1l` 
    381 #clem    rep2=`ls -1rt $vdir/$dir2/$mach/$dorv2/ |  tail -1l` 
    382     rep2=`ls -1rt $vdir/$dir1/$mach/$dorv1/ |  tail -1l` 
    383     f1s=$vdir/$dir1/$mach/$dorv1/$rep1/run.stat 
    384     f2s=$vdir/$dir2/$mach/$dorv2/$rep2/run.stat 
    385  
    386     done_oce=0 
    387  
    388     if  [ -f $f1s ] && [ -f $f2s ] ; then 
     376  get_dorv 
     377# 
     378  rep=`ls -1rt $vdir/$nam/$mach/$dorv/ |  tail -1l` 
     379  f1s=${vdir}/${nam}/${mach}/${dorv}/${rep}/run.stat 
     380  f2s=${vdir}/${nam2}/${mach}/${dorv2}/${rep}/run.stat 
     381# 
     382  if  [ -f $f1s ] && [ -f $f2s ] ; then 
    389383      cmp -s $f1s $f2s 
    390384      if [ $? == 0 ]; then 
    391         if [ $pass == 0 ]; then  
    392           printf "%-5s %s %-5s %s %s %s\n" $rep1 "AGRIF vs" $rep2 "NOAGRIF run.stat    unchanged  -    passed : " $dorv1 $dorv2 
    393         fi 
    394       else 
    395         get_ktdiff $f1s $f2s 
    396         printf "\e[38;5;196m%-5s %s %-5s %s %s %s %s %-5s %s\e[0m\n" $rep1 "AGRIF vs" $rep2 "NOAGRIF run.stat    changed  -     FAILED : " $dorv1 $dorv2 " (results are different after " $ktdiff " time steps)" 
    397 # 
    398 # Offer view of differences on the second pass 
    399 # 
    400         if [ $pass == 1 ]; then 
    401           echo "<return> to view run.stat differences" 
    402           read y 
    403           sdiff $f1s $f2s 
    404           done_oce=1 
    405           echo "<return> to continue" 
    406           read y 
    407         fi 
    408       fi 
    409     else 
    410       printf "%-27s %-27s %s\n" $dir1 $dir2 " incomplete test" 
    411     fi 
     385          if [ $pass == 0 ]; then  
     386         printf "%-5s %s %-5s %s %s %s\n" $rep "AGRIF vs" $rep "NOAGRIF run.stat    unchanged  -    passed : " $dorv $dorv2 
     387          fi 
     388      else 
     389          get_ktdiff $f1s $f2s 
     390          printf "\e[38;5;196m%-5s %s %-5s %s %s %s %s %-5s %s\e[0m\n" $rep "AGRIF vs" $rep "NOAGRIF run.stat    changed  -     FAILED : " $dorv $dorv2 " (results are different after " $ktdiff " time steps)" 
     391# 
     392# Offer view of differences on the second pass 
     393# 
     394          if [ $pass == 1 ]; then 
     395         echo "<return> to view run.stat differences" 
     396         read y 
     397         sdiff $f1s $f2s 
     398         echo "<return> to continue" 
     399         read y 
     400          fi 
     401      fi 
    412402  else 
    413     printf "%-27s %-27s %s\n" $dir1 $dir2 " incomplete test" 
     403      printf "%-27s %-27s %s\n" $nam $nam2 " incomplete test" 
    414404  fi 
    415405} 
Note: See TracChangeset for help on using the changeset viewer.