Changeset 10708


Ignore:
Timestamp:
2019-02-20T20:09:56+01:00 (18 months ago)
Author:
mathiot
Message:

add possibility to generate report on older revision + no more mix of various revision in the report output (ticket #2239)

Location:
NEMO/branches/2019/fix_sette_ticket2239
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/fix_sette_ticket2239/README

    r10687 r10708  
    6767          NOTE: if INTERACT_FLAG="no" it is needed a batch_file (see below to create a new one) 
    6868 
     69 in sette_rpt.sh : if no argument are given, the report will be generated on the last changed revision. 
     70                   if an argument is given (revision number) the report will be generated for this revision 
     71 
    6972NOTE: 
    7073in case of error you can remove you NEW_CONF directory and all files doing : 
  • NEMO/branches/2019/fix_sette_ticket2239/sette_rpt.sh

    r10704 r10708  
    2424 
    2525# 
    26   if [ -d $vdir/$nam ]; then 
    27     dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    28     dorv=`echo $dorv | sed -e 's:.*/::'` 
     26# 
     27# check if directory is here 
     28  if [ ! -d $vdir/$nam/$mach/$dorv ]; then 
     29    printf "%-27s %s %s %s\n" $nam  " directory                  MISSING : " $dorv " ( run did not start / finish correctly ) " 
     30    return 
     31  fi 
     32 
     33  if [ -d $vdir/$nam/$mach/$dorv/ ]; then 
    2934    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -2l | head -1 ` 
    3035    rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | tail -1l` 
     
    103108  pass=$3 
    104109# 
    105   if [ -d $vdir/$nam ]; then 
    106     dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    107     dorv=`echo $dorv | sed -e 's:.*/::'` 
     110# 
     111# check if directory is here 
     112  if [ ! -d $vdir/$nam/$mach/$dorv ]; then 
     113    printf "%-27s %s %s %s\n" $nam  " directory                  MISSING : " $dorv " ( run did not start / finish correctly ) " 
     114    return 
     115  fi 
     116 
     117  if [ -d $vdir/$nam/$mach/$dorv ]; then 
    108118    f1o=$vdir/$nam/$mach/$dorv/LONG/ocean.output 
    109119    f1s=$vdir/$nam/$mach/$dorv/LONG/run.stat 
     
    196206  pass=$3 
    197207# 
    198   if [ -d $vdir/$nam ]; then 
    199     dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    200     dorv=`echo $dorv | sed -e 's:.*/::'` 
     208# check if directory is here 
     209  if [ ! -d $vdir/$nam/$mach/$dorv ]; then 
     210    printf "%-27s %s %s %s\n" $nam  " directory                  MISSING : " $dorv " ( run did not start / finish correctly ) " 
     211    return 
     212  fi 
     213# 
     214  if [ -d $vdir/$nam/$mach/$dorv ]; then 
    201215    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -2l | head -1 ` 
    202216    rep2=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep REPRO | tail -1l` 
     
    252266        fi 
    253267      else 
    254         printf "%-27s %s %s\n" $nam  " tracer.stat reproducibility  FAILED : " $dorv 
     268        printf "%-27s %s %s\n" $nam  " tracer.stat reproducibility FAILED : " $dorv 
    255269# 
    256270# Offer view of differences on the second pass 
     
    289303# check if reference directory is present 
    290304  if [ ! -d $vdirref/$nam/$mach/$dorvref ]; then 
    291     printf "%s\n" " REFERENCE directory $vdirref/$nam/$mach/$dorvref is MISSING" 
     305    printf "%-25s %-27s %s\n" " REFERENCE directory for " $nam " at $dorvref is MISSING" 
    292306    return 
    293307  fi 
    294 # 
    295   if [ -d $vdir/$nam ]; then 
    296     dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    297     dorv=`echo $dorv | sed -e 's:.*/::'` 
     308  if [ ! -d $vdir/$nam/$mach/$dorv ]; then 
     309    printf "%-25s %-27s %s\n" " VALID directory for " $nam " at $dorv is MISSING" 
     310    return 
     311  fi 
     312 
     313# 
     314  if [ -d $vdir/$nam/$mach/$dorv ]; then 
    298315    f1s=$vdir/$nam/$mach/$dorv/LONG/run.stat 
    299316    f1t=$vdir/$nam/$mach/$dorv/LONG/tracer.stat 
     
    364381  pass=$3 
    365382# 
    366   if [ -d $vdir/$nam ]; then 
    367     dorv=`ls -1rt $vdir/$nam/$mach/ | tail -1l ` 
    368     dorv=`echo $dorv | sed -e 's:.*/::'` 
     383# no print needed if the repository is not here (already catch before) 
     384# 
     385  if [ -d $vdir/$nam/$mach/$dorv/ ]; then 
    369386    rep1=`ls -1rt $vdir/$nam/$mach/$dorv/ | grep LONG | head -1 ` 
    370387    if  [  -z $rep1 ] ; then 
     
    482499revision=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep 'Revision' | awk '{print $NF}'` 
    483500branchname=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep ^URL | awk -F ipsl/forge/projets/nemo/svn/ '{print $NF}'` 
    484 echo "SETTE validation report : $branchname @ r$revision  ( last change @ r$lastchange )" 
     501echo "Current code is : $branchname @ r$revision  ( last change @ r$lastchange )" 
     502 
     503# overwrite revision is argument 1 present 
     504[[ $# -eq 1 ]] && revision=$1 
     505 
     506echo "" 
     507echo "SETTE validation report generated for : $branchname @ r$revision" 
     508echo "" 
     509 
     510dorv=$revision 
     511 
    485512# 
    486513# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory 
     
    537564   echo '' 
    538565   echo 'check result differences between :' 
    539    echo "$NEMO_VALID at rev $revision" 
     566   echo "VALID directory : $NEMO_VALID at rev $revision" 
    540567   echo 'and' 
    541    echo "$NEMO_VALID_REF at rev $NEMO_REV_REF" 
     568   echo "REFERENCE directory : $NEMO_VALID_REF at rev $NEMO_REV_REF" 
     569   echo '' 
    542570   for repro_test in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WISOMIP_ST WORCA2_SAS_ICE_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WVORTEX_ST WICE_AGRIF_ST 
    543571   do 
Note: See TracChangeset for help on using the changeset viewer.