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_ticket2417 – NEMO

source: utils/CI/sette_ticket2417/sette.sh

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

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

  • Property svn:executable set to *
File size: 2.6 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           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 "";;
19        t) export SETTE_TEST_CONFIGS=$OPTARG
20           echo ""
21           echo "Configuration $SETTE_TEST_CONFIGS will be tested if they are available"
22           echo "" ;;
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 ;;
27     esac
28  done
29  shift $((OPTIND - 1))
30fi
31
32. ./param.cfg
33
34# run sette on reference configuration
35./sette_reference-configurations.sh
36if [[ $? != 0 ]]; then
37   echo ""
38   echo "--------------------------------------------------------------"
39   echo "./sette_cfg-ref.sh didn't finish properly, need investigations"
40   echo "--------------------------------------------------------------"
41   echo ""
42   exit 42
43fi
44
45# run sette on test cases
46./sette_test-cases.sh
47if [[ $? != 0 ]]; then
48   echo ""
49   echo "-----------------------------------------------------------------"
50   echo "./sette_test-cases.sh didn't finish properly, need investigations"
51   echo "-----------------------------------------------------------------"
52   echo ""
53   exit 42
54fi
55
56# run sette report
57echo ""
58echo "-------------------------------------------------------------"
59echo "./sette_rpt.sh (script will wait all nemo_sette run are done)"
60echo "-------------------------------------------------------------"
61echo ""
62NRUN=999
63NIT=0
64while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do
65   nit=$((nit+1))
66   NRUN=$( ${BATCH_STAT} | grep ${BATCH_NAME} | wc -l ) 
67   if [[ $NRUN -ne 0 ]]; then
68      printf "%-3d %s\r" $NRUN 'nemo_sette runs still in queue or running ...';
69   else
70      printf "%-50s\n" " "
71      ./sette_rpt.sh
72      exit
73   fi
74   sleep 10
75done
76printf "\n"
77echo ""
78echo "Something wrong happened, it tooks more than 3 hours to run all the sette tests"
79echo ""
Note: See TracBrowser for help on using the repository browser.