New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 12508 for utils/CI – NEMO

Changeset 12508 for utils/CI


Ignore:
Timestamp:
2020-03-04T17:00:49+01:00 (4 years ago)
Author:
mathiot
Message:

ticket #2304 : change in display output, synchrose all files that are not links instead of a selection of files as there is no consistancy in the various EXPREF between what is link or not, touch source files after synchronisation to trigger compilation in the unlikely case where source in CFG/MY_SRC is more recent than in REF/MY_SRC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/CI/sette_ticket2304/all_functions.sh

    r12505 r12508  
    9595   if [ ${SYNC_CONFIGS} == "yes" ]; then 
    9696 
     97      echo '-------------------------------------------------------------------------------' 
     98      echo '                    SOURCE AND CONFIG FILES SYNCHRONISATION                    ' 
     99      echo '' 
    97100      echo "configuration $3/$2 will be synchronised with $3/$1" 
     101      echo '' 
    98102 
    99103      lREF=$3/$1    # reference  
     
    107111            # Manage case number of file in MY_SRC changes 
    108112            # find number of file only in $lCFG/MY_SRC 
    109             FCFG=`diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep $lCFG/MY_SRC | awk '{print $4}'` 
     113            FCFG=`diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep "Only in $lCFG/MY_SRC" | awk '{print $4}'` 
    110114 
    111115            # if more than 0, trigger a cleaning as Makenemo do not properly manage this case. 
     
    113117               echo '' 
    114118               echo "$lCFG contains a different file list than $lREF :" 
    115                diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep $lCFG/MY_SRC | awk '{print $4}' 
     119               diff -r $lREF/MY_SRC $lCFG/MY_SRC | grep "Only in $lCFG/MY_SRC" | awk '{print $4}' 
    116120               echo "Synchronisation is not enough because Makenemo does not handle well case where a file in MY_SRC is removed" 
    117121               echo "Therefore, we need to clean $lCFG before starting runing it" 
     
    123127         # synchronisation $lREF/MY_SRC directory (and delete file in target location if needed) 
    124128         rsync -av --delete $lREF/MY_SRC/ $lCFG/MY_SRC 
     129 
     130         # rsync keep preserve the modification time stamp. 
     131         # To avoid case where a file in MY_SRC is replace by an older file, we touch the file 
     132         touch $lCFG/MY_SRC/* 
    125133      fi 
    126134 
    127135      # synchronize EXPREF 
    128136      if [ -d $lREF/EXPREF ] && [ -d $lCFG/EXP00 ] ; then 
    129          rsync $lREF/EXPREF/*namelist*_cfg  $lCFG/EXP00/. 
    130          rsync $lREF/EXPREF/iodef.xml       $lCFG/EXP00/. 
    131          rsync $lREF/EXPREF/*context_*.xml  $lCFG/EXP00/. 
    132          rsync $lREF/EXPREF/file_def_*.xml  $lCFG/EXP00/. 
     137         rsync -aq --no-links $lREF/EXPREF/ $lCFG/EXP00/. 
    133138      fi 
    134  
     139      echo '-------------------------------------------------------------------------------' 
    135140   fi 
    136141} 
     
    142147      lCFG=$2 
    143148      lTYP=$3 
     149      echo '' 
     150      echo '-------------------------------------------------------------------------------' 
     151      echo '                         CLEANING CONFIGURATION                                ' 
     152      echo '' 
     153      echo "./makenemo -n $lCFG -a/-r $lREF clean" 
     154      echo '' 
    144155      if [ ${lTYP} == 'tests' ]; then 
    145156         ./makenemo -n $lCFG -a $lREF clean 
     
    152163      echo "$lCFG configuration has been cleaned" 
    153164      echo '' 
     165      echo '-------------------------------------------------------------------------------' 
    154166   fi 
    155167} 
Note: See TracChangeset for help on using the changeset viewer.