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 @ 12444

Last change on this file since 12444 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
Line 
1#!/bin/sh
2# initialise user dependent variable
3SETTE_DIR=$(cd $(dirname "$0"); pwd)
4MAIN_DIR=$(dirname $SETTE_DIR)
5
6# Parse command-line arguments
7if [ $# -gt 0 ]; then
8  while getopts t:csh option; do
9     case $option in
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 "";;
18        t) export SETTE_TEST_CONFIGS=$OPTARG
19           echo ""
20           echo "Configuration $SETTE_TEST_CONFIGS will be tested if they are available"
21           echo "" ;;
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 ;;
26     esac
27  done
28  shift $((OPTIND - 1))
29fi
30
31. ./param.cfg
32
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
42fi
43
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
53fi
54
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))
65   NRUN=$( ${BATCH_STAT} | grep ${BATCH_NAME} | wc -l ) 
66   if [[ $NRUN -ne 0 ]]; then
67      printf "%-3d %s\r" $NRUN 'nemo_sette runs still in queue or running ...';
68   else
69      printf "%-50s\n" " "
70      ./sette_rpt.sh
71      exit
72   fi
73   sleep 10
74done
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.