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

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

merge sync_mysrc and sync_expcfg into sync_config, add a clean_config function and add option in sette.sh to activate synchronisation of MY_SCR/EXPREF with CONFIG_ST/EXP00/MY_SRC (-s option) or to clean a config with makenemo clean (-c option)

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