[11161] | 1 | #!/bin/sh |
---|
| 2 | # initialise user dependent variable |
---|
[3520] | 3 | SETTE_DIR=$(cd $(dirname "$0"); pwd) |
---|
[6460] | 4 | MAIN_DIR=$(dirname $SETTE_DIR) |
---|
[3520] | 5 | |
---|
[11161] | 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) |
---|
[4147] | 11 | |
---|
[11161] | 12 | if [ $# -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)) |
---|
[3520] | 23 | fi |
---|
| 24 | |
---|
[11161] | 25 | . ./param.cfg |
---|
[3520] | 26 | |
---|
[11161] | 27 | # run sette on reference configuration |
---|
| 28 | ./sette_reference-configurations.sh |
---|
| 29 | if [[ $? != 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 |
---|
[3520] | 36 | fi |
---|
| 37 | |
---|
[11161] | 38 | # run sette on test cases |
---|
| 39 | ./sette_test-cases.sh |
---|
| 40 | if [[ $? != 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 |
---|
[3520] | 47 | fi |
---|
| 48 | |
---|
[11161] | 49 | # run sette report |
---|
| 50 | echo "" |
---|
| 51 | echo "-------------------------------------------------------------" |
---|
| 52 | echo "./sette_rpt.sh (script will wait all nemo_sette run are done)" |
---|
| 53 | echo "-------------------------------------------------------------" |
---|
| 54 | echo "" |
---|
| 55 | NRUN=999 |
---|
| 56 | NIT=0 |
---|
| 57 | while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do |
---|
| 58 | nit=$((nit+1)) |
---|
| 59 | NRUN=$( ${BATCH_STAT} | grep nemo_sette | wc -l ) |
---|
| 60 | if [[ $NRUN -ne 0 ]]; then |
---|
| 61 | printf "%-3d %s\r" $NRUN 'nemo_sette run still in queue or running ...'; |
---|
| 62 | else |
---|
| 63 | printf "%-50s\n" " " |
---|
| 64 | ./sette_rpt.sh |
---|
| 65 | exit |
---|
| 66 | fi |
---|
| 67 | sleep 10 |
---|
[3520] | 68 | done |
---|
[11161] | 69 | printf "\n" |
---|
| 70 | echo "" |
---|
| 71 | echo "Something wrong happened, it tooks more than 3 hours to run all the sette tests" |
---|
| 72 | echo "" |
---|