Changeset 8864


Ignore:
Timestamp:
2017-11-30T18:42:43+01:00 (3 years ago)
Author:
lovato
Message:

trunk : fix test report for SAS, print to screen branchname and revision tag (#1983)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/SETTE/new_sette_rpt.sh

    r8852 r8864  
    5454## Compare the two netcdf files 
    5555    cdo diffn $f1o $f2o > cdo_diff.out 2> /dev/null 
     56## Identical if cdo_diff.out exists but has zero size 
     57    if [ ! -s cdo_diff.out ]; then 
     58       difi=0 
     59    else 
    5660## Identical if first character of $dif ==0 
    57     [ ! -s cdo_diff.out ] && continue 
    58     dif=$( grep -om1 '[0-9]* of [0-9]* records differ' cdo_diff.out ) 
     61       dif=$( grep -om1 '[0-9]* of [0-9]* records differ' cdo_diff.out ) 
    5962# difi contains the first character of summary of cdo dif. if = 0, then 0 record differ between the 2 files     
    60     if [ -n "$dif" ]; then 
    61         difi=`echo $dif | cut -c -1` 
     63       if [ -n "$dif" ]; then 
     64           difi=`echo $dif | cut -c -1` 
     65       fi 
    6266    fi 
    6367    \rm cdo_diff.out  
     
    6569    if [ $difi == 0 ]; then    
    6670       if [ $pass == 0 ]; then 
    67          printf "%-20s %s %s\n" $nam  " ice restart files are IDENTICAL :  passed : " $dorv 
     71         printf "%-20s %s %s\n" $nam  " ice restarts are IDENTICAL  passed : " $dorv 
    6872       fi 
    6973    else 
    70        printf "%-20s %s %s\n" $nam  " ice restart files are DIFFERENT : FAILED : " $dorv  
     74       printf "%-20s %s %s\n" $nam  " ice restarts are DIFFERENT FAILED : " $dorv  
    7175        # 
    7276   # Offer view of differences on the second pass 
     
    329333######################################################################################### 
    330334# 
    331   mach=`grep "COMPILER=" ./sette.sh | sed -e 's/COMPILER=//'` 
     335  mach=`grep "COMPILER=" ./new_sette.sh | sed -e 's/COMPILER=//'` 
    332336  NEMO_VALID=`grep "NEMO_VALIDATION_DIR=" ./param.cfg | sed -e 's/NEMO_VALIDATION_DIR=//'` 
    333337# Directory to run the tests 
     
    346350  fi 
    347351# 
    348  
     352# Show current revision tag and branch name 
     353# 
     354cmd="svn" 
     355[ ! -d "$SETTE_DIR/.svn" ] && cmd="git $cmd" 
     356revision=`$cmd info | grep Revision | cut -d ":" -f 2 | tr -d ' '` 
     357branchname=`$cmd info | grep URL | rev | cut -d "/" -f 3 | rev` 
     358echo "SETTE validation report : $branchname @ r$revision" 
     359# 
    349360# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory 
    350361 
Note: See TracChangeset for help on using the changeset viewer.