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.
sette.sh in utils/CI/sette_ticket2304 – NEMO

source: utils/CI/sette_ticket2304/sette.sh @ 12445

Last change on this file since 12445 was 12444, checked in by mathiot, 4 years ago

Corrections after Simon review: add AGRIF context file in the synchronisation, update sette_rpt.sh to keep old and new usage available, update sette comments and issue with old set as revision in get_dorv (ticket #2304)

  • Property svn:executable set to *
File size: 2.5 KB
RevLine 
[11161]1#!/bin/sh
2# initialise user dependent variable
[3520]3SETTE_DIR=$(cd $(dirname "$0"); pwd)
[6460]4MAIN_DIR=$(dirname $SETTE_DIR)
[3520]5
[11161]6# Parse command-line arguments
7if [ $# -gt 0 ]; then
[12422]8  while getopts t:csh option; do
[11161]9     case $option in
[12422]10        c) export SETTE_CLEAN_CONFIGS='yes'
11           echo ""
12           echo "Configuration $SETTE_TEST_CONFIGS will be cleaned"
13           echo "";;
14        s) export SETTE_SYNC_CONFIGS='yes'
15           echo ""
16           echo "MY_SRC and EXP00 in $SETTE_TEST_CONFIGS will be synchronised with the MY_SRC and EXPREF from the reference configuration"
17           echo "";;
[11161]18        t) export SETTE_TEST_CONFIGS=$OPTARG
19           echo ""
20           echo "Configuration $SETTE_TEST_CONFIGS will be tested if they are available"
21           echo "" ;;
[12422]22        h | *) echo 'sette.sh allows no arguments (in this case all configuration will be tested)'
23               echo '-t "CFG1_to_test CFG2_to_test ..." to test some specific configurations'
24               echo '-c to clean each configuration'
25               echo '-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF'; exit 42 ;;
[11161]26     esac
27  done
28  shift $((OPTIND - 1))
[3520]29fi
30
[11161]31. ./param.cfg
[3520]32
[11161]33# run sette on reference configuration
34./sette_reference-configurations.sh
35if [[ $? != 0 ]]; then
36   echo ""
37   echo "--------------------------------------------------------------"
38   echo "./sette_cfg-ref.sh didn't finish properly, need investigations"
39   echo "--------------------------------------------------------------"
40   echo ""
41   exit 42
[3520]42fi
43
[11161]44# run sette on test cases
45./sette_test-cases.sh
46if [[ $? != 0 ]]; then
47   echo ""
48   echo "-----------------------------------------------------------------"
49   echo "./sette_test-cases.sh didn't finish properly, need investigations"
50   echo "-----------------------------------------------------------------"
51   echo ""
52   exit 42
[3520]53fi
54
[11161]55# run sette report
56echo ""
57echo "-------------------------------------------------------------"
58echo "./sette_rpt.sh (script will wait all nemo_sette run are done)"
59echo "-------------------------------------------------------------"
60echo ""
61NRUN=999
62NIT=0
63while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do
64   nit=$((nit+1))
[12272]65   NRUN=$( ${BATCH_STAT} | grep ${BATCH_NAME} | wc -l ) 
[11161]66   if [[ $NRUN -ne 0 ]]; then
[12272]67      printf "%-3d %s\r" $NRUN 'nemo_sette runs still in queue or running ...';
[11161]68   else
69      printf "%-50s\n" " "
70      ./sette_rpt.sh
71      exit
72   fi
73   sleep 10
[3520]74done
[11161]75printf "\n"
76echo ""
77echo "Something wrong happened, it tooks more than 3 hours to run all the sette tests"
78echo ""
Note: See TracBrowser for help on using the repository browser.