source:
NEMO/branches/2019/fix_sette_ticket2239/sette.sh
@
10905
Last change on this file since 10905 was 10750, checked in by mathiot, 5 years ago | |
---|---|
|
|
File size: 2.0 KB |
Rev | Line | |
---|---|---|
[10687] | 1 | #!/bin/sh |
[10713] | 2 | # initialise user dependent variable |
[10717] | 3 | SETTE_DIR=$(cd $(dirname "$0"); pwd) |
4 | MAIN_DIR=$(dirname $SETTE_DIR) | |
[10747] | 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 | ||
[10750] | 12 | if [ $# -gt 0 ]; then |
13 | while getopts t: option; do | |
14 | case $option in | |
15 | t) export SETTE_TEST_CONFIGS=$OPTARG ;; | |
16 | h) echo 'sette.sh allow no arguments (all configuration will be tested or -t "CFG1_to_test CFG2_to_test ..."'; exit 42 ;; | |
17 | esac | |
18 | done | |
19 | shift $((OPTIND - 1)) | |
20 | fi | |
21 | ||
[10713] | 22 | . ./param.cfg |
[10687] | 23 | |
24 | # run sette on reference configuration | |
[10713] | 25 | ./sette_reference-configurations.sh |
[10690] | 26 | if [[ $? != 0 ]]; then |
27 | echo "" | |
28 | echo "--------------------------------------------------------------" | |
29 | echo "./sette_cfg-ref.sh didn't finish properly, need investigations" | |
30 | echo "--------------------------------------------------------------" | |
31 | echo "" | |
[10687] | 32 | exit 42 |
33 | fi | |
34 | ||
35 | # run sette on test cases | |
36 | ./sette_test-cases.sh | |
[10690] | 37 | if [[ $? != 0 ]]; then |
38 | echo "" | |
39 | echo "-----------------------------------------------------------------" | |
40 | echo "./sette_test-cases.sh didn't finish properly, need investigations" | |
41 | echo "-----------------------------------------------------------------" | |
42 | echo "" | |
[10687] | 43 | exit 42 |
44 | fi | |
45 | ||
46 | # run sette report | |
[10713] | 47 | echo "" |
48 | echo "-------------------------------------------------------------" | |
49 | echo "./sette_rpt.sh (script will wait all nemo_sette run are done)" | |
50 | echo "-------------------------------------------------------------" | |
51 | echo "" | |
52 | NRUN=999 | |
53 | NIT=0 | |
54 | while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do | |
55 | nit=$((nit+1)) | |
56 | NRUN=$( ${BATCH_STAT} | grep nemo_sette | wc -l ) | |
57 | if [[ $NRUN -ne 0 ]]; then | |
58 | printf "%-3d %s\r" $NRUN 'nemo_sette run still in queue or running ...'; | |
59 | else | |
[10717] | 60 | printf "%-50s\n" " " |
[10713] | 61 | ./sette_rpt.sh |
62 | exit | |
63 | fi | |
64 | sleep 10 | |
65 | done | |
66 | printf "\n" | |
67 | echo "" | |
68 | echo "Something wrong happened, it tooks more than 3 hours to run all the sette tests" | |
69 | echo "" |
Note: See TracBrowser
for help on using the repository browser.