Changeset 12569


Ignore:
Timestamp:
2020-03-18T12:22:56+01:00 (6 months ago)
Author:
mathiot
Message:

ticket #2304: merge branch sette_ticket2304 into sette (thank you Simon for the review and all the suggestions you made). It include synchronisation and cleaning option between the REF config and the _ST config to ease the work when the reference configurations are changed and display bug in sette_check_avail_rev

Location:
utils/CI/sette
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • utils/CI/sette/README.rst

    r11161 r12569  
    8181             The list of available configurations is available in running ./sette_list_avail_cfg.sh. 
    8282          - user need to set up the param.cfg file correctly and download input file before running the script. 
     83          - user can enforce synchronisation (-s option) of the existing CFG_ST with the REF configuration (EXPREF and MY_SRC).  
     84          - user can enforce cleaning of the CFG_ST configuration (use of makenemo -n CFG_ST clean) (-c option) 
    8385* ``sette_rpt.sh``            : it generates the sette report. 
    8486          - if no argument is given, the report will be generated on the last changed revision. 
  • utils/CI/sette/all_functions.sh

    r11161 r12569  
    9191usage=" if value is a string ths is neede syntax : ./set_namelist namelist_name var_name \"new_value\" " 
    9292 
     93# sync MYSRC files (input CFG and CFG_ST) 
     94sync_config() { 
     95   if [ ${SYNC_CONFIGS} == "yes" ]; then 
     96 
     97      lREF=$3/$1    # reference  
     98      lCFG=$3/$2    # target 
     99 
     100      echo '-------------------------------------------------------------------------------' 
     101      echo '                    SOURCE AND CONFIG FILES SYNCHRONISATION                    ' 
     102      echo '' 
     103      echo "configuration $lCFG/MY_SRC will be synchronised with $lREF/MY_SRC" 
     104      echo '' 
     105      # synchronise MY_SRC if $lCFG directory exist 
     106      if [ -d $lREF/MY_SRC ] && [ -d $lCFG ] ; then 
     107 
     108         if [ -d $lCFG/MY_SRC ] ; then 
     109 
     110            # Manage case number of file in MY_SRC changes 
     111            # find number of file only in $lCFG/MY_SRC 
     112            FCFG=`diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep "Only in $lCFG/MY_SRC" | awk '{print $4}'` 
     113 
     114            # if more than 0, trigger a cleaning as Makenemo do not properly manage this case. 
     115            if [ ! -z "$FCFG" ]; then  
     116               echo '' 
     117               echo "$lCFG contains a different file list than $lREF :" 
     118               diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep "Only in $lCFG/MY_SRC" | awk '{print $4}' 
     119               echo "Synchronisation is not enough because Makenemo does not handle well case where a file in MY_SRC is removed" 
     120               echo "Therefore, we need to clean $lCFG before starting runing it" 
     121               echo '' 
     122               CLEAN_CONFIGS="yes" 
     123            fi 
     124         fi 
     125 
     126         # synchronisation $lREF/MY_SRC directory (and delete file in target location if needed) 
     127         rsync -a --delete $lREF/MY_SRC/ $lCFG/MY_SRC 
     128 
     129         # rsync keep preserve the modification time stamp. 
     130         # To avoid case where a file in MY_SRC is replace by an older file, we touch the file 
     131         touch $lCFG/MY_SRC/* 
     132      fi 
     133 
     134      echo '' 
     135      echo "configuration $lCFG/EXP00 will be synchronised with $lREF/EXPREF" 
     136      echo "(links are skipped)" 
     137      echo '' 
     138      # synchronize EXPREF 
     139      if [ -d $lREF/EXPREF ] && [ -d $lCFG/EXP00 ] ; then 
     140         rsync -a --no-links $lREF/EXPREF/ $lCFG/EXP00/. 
     141      fi 
     142      echo '-------------------------------------------------------------------------------' 
     143   fi 
     144} 
     145 
     146# clean _ST config (input CFG CFG_ST TYPE (test or ref)) 
     147clean_config() { 
     148   if [ ${CLEAN_CONFIGS} == "yes" ]; then 
     149      lREF=$1 
     150      lCFG=$2 
     151      lTYP=$3 
     152      echo '' 
     153      echo '-------------------------------------------------------------------------------' 
     154      echo '                         CLEANING CONFIGURATION                                ' 
     155      echo '' 
     156      echo "./makenemo -n $lCFG -a/-r $lREF clean" 
     157      echo '' 
     158      if [ ${lTYP} == 'tests' ]; then 
     159         ./makenemo -n $lCFG -a $lREF clean 
     160      elif [ ${lTYP} == 'cfgs' ]; then 
     161         ./makenemo -n $lCFG -r $lREF clean 
     162      else 
     163         echo 'ERROR in the cleaning process'; exit 42 
     164      fi 
     165      echo '' 
     166      echo "$lCFG configuration has been cleaned" 
     167      echo '' 
     168      echo '-------------------------------------------------------------------------------' 
     169   fi 
     170} 
     171 
    93172# define validation dir 
    94173set_valid_dir () { 
    95     LANG=en_US 
    96     REVISION_NB=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${SETTE_DIR}/.. | grep "Last Changed Rev" | awk '{print $NF}'` 
     174    REVISION_NB=`${SVN_CMD} info ${SETTE_DIR}/.. | grep "Last Changed Rev" | awk '{print $NF}'` 
    97175    if [ ${#REVISION_NB} -eq 0 ] 
    98176    then 
     
    156234                LINEVAR=$( grep -s -n "$VAR_NAME" ${EXE_DIR}/$NAMREF | awk -F: '{ { print $1} }' ) 
    157235                echo " $VAR_NAME found in ${EXE_DIR}/$NAMREF at line $LINEVAR " >> ${SETTE_DIR}/output.sette 
     236 
    158237#   search for namelist group name 
    159238                NAMGRP=$( head -n$LINEVAR ${EXE_DIR}/$NAMREF | grep --line-buffered "^&nam" | tail -1 | awk -F" " '{ { print $1} }' )  
    160239                echo " variable $VAR_NAME will be added in $NAMGRP namelist-group of namelist file ${EXE_DIR}/$1 " >> ${SETTE_DIR}/output.sette 
     240 
     241# check if namelist group present in namelist_cfg 
     242# if missing group is added at the end of namelist_cfg 
     243                NGRP=$(grep ${NAMGRP} ${EXE_DIR}/$1 | wc -l ) 
     244                if [ ${NGRP} -eq 0 ]; then 
     245                   echo ''                                                                          >> ${SETTE_DIR}/output.sette 
     246                   echo "+++++ Group ${NAMGRP} containing ${2} is missing in ${EXE_DIR}/$1 +++++ "  >> ${SETTE_DIR}/output.sette 
     247                   echo "+++++ Group ${NAMGRP}                 is added   in ${EXE_DIR}/$1 +++++ "  >> ${SETTE_DIR}/output.sette 
     248                   echo ''                                                                          >> ${SETTE_DIR}/output.sette 
     249                   echo "&${NAMGRP}" >> ${EXE_DIR}/$1 
     250                   echo "/"          >> ${EXE_DIR}/$1 
     251                fi 
     252 
    161253# Add $VARNAME in namelist file ${EXE_DIR}/$1 in namelist group $NAMGRP 
    162254# on mac osx, replace sed --posix by gsed (available with mac port) 
    163255                sed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp || gsed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
     256 
    164257# if file not empty replace ${EXE_DIR}/$1 
    165                 if [ -s ${EXE_DIR}/$1.tmp ] ; then 
     258               if [ -s ${EXE_DIR}/$1.tmp ] ; then 
    166259                   mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1  
    167260                else 
  • utils/CI/sette/param.cfg

    r12135 r12569  
    6262# add key key_nosignedzero at the compilation step 
    6363ADD_NOSIGNEDZERO=${SETTE_ADD_NOSIGNEDZERO:-"yes"} 
    64 #- only for IBM 
     64# only for IBM 
    6565#TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
     66# cleaning CFG_ST 
     67CLEAN_CONFIGS=${SETTE_CLEAN_CONFIGS:-"no"} 
     68# synchronisation MY_SRC and EXP00 of CFG_ST with MY_SRC and EXPREF form CFG 
     69SYNC_CONFIGS=${SETTE_SYNC_CONFIGS:-"no"} 
     70# langage (only en_US supported). This is used to grep information form linux/svn command. 
     71LC_MESSAGES=en_US 
    6672# ------------------------------------------------------------------------------------------ 
    6773# 
     
    7076TEST_CONFIGS=${SETTE_TEST_CONFIGS:-"ORCA2_ICE_PISCES ORCA2_OFF_PISCES AMM12 AGRIF SPITZ12 GYRE_PISCES SAS ORCA2_ICE_OBS ICE_AGRIF OVERFLOW LOCK_EXCHANGE VORTEX ISOMIP"} 
    7177# ------------------------------------------------------------------------------------------ 
     78# 
     79# reporting   
     80# Set number of passes (default only 1). For a second pass, set '0 1' 
     81RPT_PASSES=${SETTE_RPT_NPASSES:-'0'}  
  • utils/CI/sette/sette.sh

    r12135 r12569  
    55 
    66# Parse command-line arguments 
    7 # 
    8 #  -t "test configurations": select active test configurations 
    9 #                            (overrides selection made using 
    10 #                            environment variable SETTE_TEST_CONFIGS) 
    11  
    127if [ $# -gt 0 ]; then 
    13   while getopts :ht: option; do  
     8  while getopts t:csh option; do  
    149     case $option in 
     10        c) export SETTE_CLEAN_CONFIGS='yes' 
     11           export SETTE_SYNC_CONFIGS='yes' 
     12           echo "" 
     13           echo "Configuration $SETTE_TEST_CONFIGS will be cleaned; this option enforces also synchronisation" 
     14           echo "";; 
     15        s) export SETTE_SYNC_CONFIGS='yes' 
     16           echo "" 
     17           echo "MY_SRC and EXP00 in $SETTE_TEST_CONFIGS will be synchronised with the MY_SRC and EXPREF from the reference configuration" 
     18           echo "";; 
    1519        t) export SETTE_TEST_CONFIGS=$OPTARG 
    1620           echo "" 
    1721           echo "Configuration $SETTE_TEST_CONFIGS will be tested if they are available" 
    1822           echo "" ;; 
    19         h | *) echo 'sette.sh allow no arguments (all configuration will be tested or -t "CFG1_to_test CFG2_to_test ..."'; exit 42 ;; 
     23        h | *) echo 'sette.sh allows no arguments (in this case all configuration will be tested)' 
     24               echo '-t "CFG1_to_test CFG2_to_test ..." to test some specific configurations' 
     25               echo '-c to clean each configuration' 
     26               echo '-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF'; exit 42 ;; 
    2027     esac 
    2128  done 
     
    5764while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do 
    5865   nit=$((nit+1)) 
    59    NRUN=$( ${BATCH_STAT} | grep nemo_sette | wc -l )  
     66   NRUN=$( ${BATCH_STAT} | grep ${BATCH_NAME} | wc -l )  
    6067   if [[ $NRUN -ne 0 ]]; then  
    61       printf "%-3d %s\r" $NRUN 'nemo_sette run still in queue or running ...'; 
     68      printf "%-3d %s\r" $NRUN 'nemo_sette runs still in queue or running ...'; 
    6269   else 
    6370      printf "%-50s\n" " " 
  • utils/CI/sette/sette_list_avail_rev.sh

    r11161 r12569  
    11#!/bin/bash -f 
    22# set -vx 
     3 
     4SETTE_DIR=$(cd $(dirname "$0"); pwd) 
     5MAIN_DIR=$(dirname $SETTE_DIR) 
     6 
     7. ./param.cfg 
     8 
     9if [ $# -gt 0 ]; then 
     10  while getopts c:h option; do  
     11     case $option in 
     12        c) COMPILER=$OPTARG;; 
     13        h | *) echo '' 
     14               echo 'sette_list_avail_rev.sh : '  
     15               echo '     list all sette directory and available revisions created with the compiler specified in param.cfg or in the startup file)' 
     16               echo '-c COMPILER_name :' 
     17               echo '     list all sette directory and available revisions created with the compiler specified' 
     18               echo '' 
     19               exit 42;; 
     20     esac 
     21  done 
     22  shift $((OPTIND - 1)) 
     23fi 
     24 
    325# 
    426lst_rev () { 
     
    2446       rev=`echo $ALLLST | cut -d\  -f ${irev}` 
    2547       cfgrev=`echo $CFGLST | cut -d\  -f ${irevcfg}` 
     48       if [ -z $cfgrev ] ; then cfgrev=-9999 ; fi 
    2649       if [ $cfgrev == $rev ] ; then 
    2750          printf "%-6s  " $rev 
     
    3457} 
    3558 
    36   SETTE_DIR=$(cd $(dirname "$0"); pwd) 
    37   MAIN_DIR=$(dirname $SETTE_DIR) 
    38   . ./param.cfg 
    3959 
    40   mach=${COMPILER} 
    41   NEMO_VALID=${NEMO_VALIDATION_DIR} 
     60  NEMO_VALID=${NEMO_VALIDATION_DIR}/ 
    4261  
    4362 # list of all revision available 
    44  DIRLST=`find ${NEMO_VALID} -maxdepth 3 -mindepth 3 -type d | sed -e 's/.*\/W.*\///' | sort -u -r` 
     63 DIRLST=`find ${NEMO_VALID} -maxdepth 3 -mindepth 3 -type d -regex ".*\/W.*\/${COMPILER}\/.*" | sed -e "s/.*\/W.*\/${COMPILER}\///" | sort -u -r` 
    4564 
    4665 # display header 
     
    4968 echo "" 
    5069 printf " List of all avail. rev. is : " 
    51  for dir in `echo $DIRLST`; do printf "%5s  " $dir ; done 
     70 for dir in `echo $DIRLST`; do printf "%-6s  " $dir ; done 
    5271 printf "\n" 
    5372 
  • utils/CI/sette/sette_reference-configurations.sh

    r12474 r12569  
    162162    export TEST_NAME="LONG" 
    163163    cd ${MAIN_DIR} 
     164    # 
     165    # syncronisation if target directory/file exist (not done by makenemo) 
     166    . ${SETTE_DIR}/all_functions.sh 
     167    sync_config  GYRE_PISCES GYRE_PISCES_ST 'cfgs' 
     168    clean_config GYRE_PISCES GYRE_PISCES_ST 'cfgs' 
     169    # 
    164170    . ./makenemo -m ${CMP_NAM} -n GYRE_PISCES_ST -r GYRE_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    165171    cd ${SETTE_DIR} 
     
    298304    export TEST_NAME="LONG" 
    299305    cd ${MAIN_DIR} 
     306    # 
     307    # syncronisation if target directory/file exist (not done by makenemo) 
     308    . ${SETTE_DIR}/all_functions.sh 
     309    sync_config  ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST 'cfgs' 
     310    clean_config ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST 'cfgs' 
     311    # 
    300312    . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_PISCES_ST -r ORCA2_ICE_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    301313    cd ${SETTE_DIR} 
     
    519531    export TEST_NAME="LONG" 
    520532    cd ${MAIN_DIR} 
     533    # 
     534    # syncronisation if target directory/file exist (not done by makenemo) 
     535    . ${SETTE_DIR}/all_functions.sh 
     536    sync_config  ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST 'cfgs' 
     537    clean_config ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST 'cfgs' 
     538    # 
    521539    . ./makenemo -m ${CMP_NAM} -n ORCA2_OFF_PISCES_ST -r ORCA2_OFF_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    522540    cd ${SETTE_DIR} 
     
    689707    export TEST_NAME="LONG" 
    690708    cd ${MAIN_DIR} 
     709    # 
     710    # syncronisation if target directory/file exist (not done by makenemo) 
     711    . ${SETTE_DIR}/all_functions.sh 
     712    sync_config  AMM12 AMM12_ST 'cfgs' 
     713    clean_config AMM12 AMM12_ST 'cfgs' 
     714    # 
    691715    . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    692716    cd ${SETTE_DIR} 
     
    812836    export TEST_NAME="LONG" 
    813837    cd ${MAIN_DIR} 
     838    # 
     839    # syncronisation if target directory/file exist (not done by makenemo) 
     840    . ${SETTE_DIR}/all_functions.sh 
     841    sync_config  ORCA2_SAS_ICE ORCA2_SAS_ICE_ST 'cfgs' 
     842    clean_config ORCA2_SAS_ICE ORCA2_SAS_ICE_ST 'cfgs' 
     843    # 
    814844    . ./makenemo -m ${CMP_NAM} -n ORCA2_SAS_ICE_ST -r ORCA2_SAS_ICE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    815845    cd ${SETTE_DIR} 
     
    942972    export TEST_NAME="REPRO_4_8" 
    943973    cd ${MAIN_DIR} 
     974    # 
     975    # syncronisation if target directory/file exist (not done by makenemo) 
     976    . ${SETTE_DIR}/all_functions.sh 
     977    sync_config  ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST 'cfgs' 
     978    clean_config ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST 'cfgs' 
     979    # 
    944980    . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_OBS_ST -r ORCA2_ICE_PISCES -d "OCE ICE"  -j 8 add_key "key_asminc ${ADD_KEYS}" del_key "key_top" 
    945981    cd ${SETTE_DIR} 
     
    10501086    export TEST_NAME="LONG" 
    10511087    cd ${MAIN_DIR} 
     1088    # 
     1089    # syncronisation if target directory/file exist (not done by makenemo) 
     1090    . ${SETTE_DIR}/all_functions.sh 
     1091    sync_config  AGRIF_DEMO AGRIF_DEMO_ST 'cfgs' 
     1092    clean_config AGRIF_DEMO AGRIF_DEMO_ST 'cfgs' 
     1093    # 
    10521094    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_ST -r AGRIF_DEMO -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    10531095    cd ${SETTE_DIR} 
     
    13021344    export TEST_NAME="ORCA2" 
    13031345    cd ${MAIN_DIR} 
     1346    # 
     1347    # syncronisation if target directory/file exist (not done by makenemo) 
     1348    . ${SETTE_DIR}/all_functions.sh 
     1349    sync_config  AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST 'cfgs' 
     1350    clean_config AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST 'cfgs' 
     1351    # 
    13041352    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_NOAGRIF_ST -r AGRIF_DEMO -j 8 add_key "${ADD_KEYS}" del_key "key_agrif" 
    13051353    cd ${SETTE_DIR} 
     
    13381386    export TEST_NAME="LONG" 
    13391387    cd ${MAIN_DIR} 
     1388    # 
     1389    # syncronisation if target directory/file exist (not done by makenemo) 
     1390    . ${SETTE_DIR}/all_functions.sh 
     1391    sync_config  SPITZ12 SPITZ12_ST 'cfgs' 
     1392    clean_config SPITZ12 SPITZ12_ST 'cfgs' 
     1393    # 
    13401394    . ./makenemo -m ${CMP_NAM} -n SPITZ12_ST -r SPITZ12 -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    13411395    cd ${SETTE_DIR} 
  • utils/CI/sette/sette_rpt.sh

    r11497 r12569  
    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 ` 
     17    dorv2=`ls -1rt $vdir/$nam2/$mach/ 2>/dev/null | tail -1l ` 
    1818    dorv2=`echo $dorv2 | sed -e 's:.*/::'` 
    1919  else 
     
    211211      else 
    212212        get_ktdiff $f1t $f2t 
    213         printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " tracer.stat    reproducibility FAILED : " $dorv " (results are different after " $ktdiff " time steps)" 
     213        printf "\e[38;5;196m%-27s %s %s %s %-5s %s\e[0m\n" $nam  " tracer.stat reproducibility FAILED : " $dorv " (results are different after " $ktdiff " time steps)" 
    214214# 
    215215# Offer view of differences on the second pass 
     
    283283        fi 
    284284      else 
    285         printf "%-20s %s %s\n" $nam  " run.stat    files are DIFFERENT " 
     285        get_ktdiff $f1s $f2s 
     286        printf "%-20s %s %s %-5s %s\n" $nam  " run.stat    files are DIFFERENT (results are different after " $ktdiff " time steps)" 
    286287# 
    287288# Offer view of differences on the second pass 
     
    306307        fi 
    307308      else 
    308         printf "%-20s %s %s\n" $nam  " tracer.stat files are DIFFERENT " 
     309        get_ktdiff $f1t $f2t 
     310        printf "%-20s %s %s %-5s %s\n" $nam  " tracer.stat files are DIFFERENT (results are different after " $ktdiff " time steps) " 
    309311# 
    310312# Offer view of differences on the second pass 
     
    418420  NEMO_VALID=${NEMO_VALIDATION_DIR} 
    419421  NEMO_VALID_REF=${NEMO_VALIDATION_REF} 
    420   LANG=en_US 
    421422# 
    422423  if [ ! -d $NEMO_VALID ]; then 
     
    425426  fi 
    426427# 
    427 # Directory to run the tests 
    428   CONFIG_DIR0=${MAIN_DIR}/cfgs 
    429   TOOLS_DIR=${MAIN_DIR}/tools 
    430   NPROC=32 
    431   SAS_RESTART_DIR=${CONFIG_DIR0}/ORCA2_SAS_ICE_ST 
    432428# 
    433429# Show current revision tag and branch name 
    434430# 
    435431echo "" 
    436 lastchange=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep 'Last Changed Rev' | awk '{print $NF}'` 
    437 revision=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep 'Revision' | awk '{print $NF}'` 
    438 branchname=`LC_MESSAGES=${LANG} ${SVN_CMD} info ${MAIN_DIR} | grep ^URL | awk -F ipsl/forge/projets/nemo/svn/ '{print $NF}'` 
     432lastchange=`${SVN_CMD} info ${MAIN_DIR} | grep 'Last Changed Rev' | awk '{print $NF}'` 
     433revision=`${SVN_CMD} info ${MAIN_DIR} | grep 'Revision' | awk '{print $NF}'` 
     434branchname=`${SVN_CMD} info ${MAIN_DIR} | grep ^URL | awk -F ipsl/forge/projets/nemo/svn/ '{print $NF}'` 
    439435echo "Current code is : $branchname @ r$revision  ( last change @ r$lastchange )" 
    440436[ `${SVN_CMD} status -q ${MAIN_DIR}/{cfg,tests,src} | wc -l` -ge 1 ] && lastchange=${lastchange}+ 
    441437 
    442 # overwrite revision is argument 1 present 
    443 [[ $# -eq 1 ]] && lastchange=$1 
     438# overwrite revision or compiler 
     439  if [ $# -gt 0 ]; then 
     440    while getopts r:c:h option; do  
     441       case $option in 
     442          c) mach=$OPTARG;; 
     443          r) rev=$OPTARG;; 
     444          h | *) echo '' 
     445                 echo 'sette_rpt.sh : '  
     446                 echo '     display result for the latest change' 
     447                 echo ' -c COMPILER_name :' 
     448                 echo '     display result for the specified compiler' 
     449                 echo ' -r REVISION_number :' 
     450                 echo '     display sette results for the specified revision (set old for the latest revision available for each config)' 
     451                 echo '' 
     452                 exit 42;; 
     453       esac 
     454    done 
     455    shift $((OPTIND - 1)) 
     456fi 
     457 
     458# if $1 (remaining arguments) 
     459if [[ ! -z $1 ]] ; then rev=$1 ; fi 
     460 
     461# by default use the current lastchanged revision 
     462lastchange=${rev:-$lastchange} 
    444463 
    445464echo "" 
     
    454473# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory 
    455474 
    456 for pass in  0 1  
     475for pass in  $RPT_PASSES  
    457476do 
    458477# 
  • utils/CI/sette/sette_test-cases.sh

    r12428 r12569  
    164164    export TEST_NAME="LONG" 
    165165    cd ${MAIN_DIR} 
     166    # 
     167    . ${SETTE_DIR}/all_functions.sh 
     168    # 
     169    clean_config OVERFLOW OVERFLOW_ST 'tests' 
     170    # 
     171    sync_config  OVERFLOW OVERFLOW_ST 'tests' 
     172    # 
    166173    . ./makenemo -m ${CMP_NAM} -n OVERFLOW_ST -a OVERFLOW -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    167174    cd ${SETTE_DIR} 
     
    259266    export TEST_NAME="LONG" 
    260267    cd ${MAIN_DIR} 
     268    # 
     269    # syncronisation if target directory/file exist (not done by makenemo) 
     270    . ${SETTE_DIR}/all_functions.sh 
     271    # 
     272    clean_config LOCK_EXCHANGE LOCK_EXCHANGE_ST 'tests' 
     273    # 
     274    sync_config  LOCK_EXCHANGE LOCK_EXCHANGE_ST 'tests' 
     275    # 
    261276    . ./makenemo -m ${CMP_NAM} -n LOCK_EXCHANGE_ST -a LOCK_EXCHANGE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    262277    cd ${SETTE_DIR} 
     
    355370    export TEST_NAME="LONG" 
    356371    cd ${MAIN_DIR} 
     372    # 
     373    # syncronisation if target directory/file exist (not done by makenemo) 
     374    . ${SETTE_DIR}/all_functions.sh 
     375    # 
     376    clean_config VORTEX VORTEX_ST 'tests' 
     377    # 
     378    sync_config  VORTEX VORTEX_ST 'tests' 
     379    # 
    357380    . ./makenemo -m ${CMP_NAM} -n VORTEX_ST -a VORTEX -j 8  add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    358381    cd ${SETTE_DIR} 
     
    524547    export TEST_NAME="LONG" 
    525548    cd ${MAIN_DIR} 
     549    # 
     550    # syncronisation if target directory/file exist (not done by makenemo) 
     551    . ${SETTE_DIR}/all_functions.sh 
     552    # 
     553    clean_config ICE_AGRIF ICE_AGRIF_ST 'tests' 
     554    # 
     555    sync_config  ICE_AGRIF ICE_AGRIF_ST 'tests' 
     556    # 
    526557    . ./makenemo -m ${CMP_NAM} -n ICE_AGRIF_ST -a ICE_AGRIF -j 8  add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    527558    cd ${SETTE_DIR} 
     
    701732    export TEST_NAME="LONG" 
    702733    cd ${MAIN_DIR} 
     734    # 
     735    # syncronisation if target directory/file exist (not done by makenemo) 
     736    . ${SETTE_DIR}/all_functions.sh 
     737    # 
     738    clean_config ISOMIP ISOMIP_ST 'tests' 
     739    # 
     740    sync_config  ISOMIP ISOMIP_ST 'tests' 
     741    # 
    703742    . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -a ISOMIP -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" 
    704743    cd ${SETTE_DIR} 
Note: See TracChangeset for help on using the changeset viewer.