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

source: utils/CI/sette_ticket2459/sette.sh @ 13381

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

ticket

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