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

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

use of BATCH_NAME to replace hard coded nemo_sette

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