Changeset 1be76d8 in flexpart.git for tests/NILU/run_tests
- Timestamp:
- Oct 1, 2015, 3:29:19 PM (9 years ago)
- Branches:
- master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug
- Children:
- ac5b22b
- Parents:
- 1333256
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/NILU/run_tests
r1333256 r1be76d8 1 1 #!/bin/bash 2 2 3 FLEXOUT_TMP=/home/ignacio/repos/flextest/ 3 #input: 4 # FP_exec : path to flexpart executable 5 # path_flextest: directory path to output base directory 6 # test_names (bash array): list of tests to be run 7 8 # defaults 9 FP_exec=/home/ignacio/repos/flexpart/src/FP_ecmwf_gfortran 10 path_flextest=/home/ignacio/repos/flextest/ 11 options_default=/home/ignacio/repos/flexpart/options/ 12 #declare -a test_names=('1' 'HelloWorld' 'Fwd1' 'Fwd2' 'Bwd1' 'Volc' '2') 13 #test_names[0]='1' 14 test_names[0]='HelloWorld' 15 16 group_name=tests 17 18 source ./$1 19 4 20 5 21 suffix=$(date "+%y-%m-%d_%H%M%S") 6 #test_tmp=${FLEXOUT_TMP}${base_dir}${test_dir}_${suffix} 7 base_dir=${FLEXOUT_TMP}/tests_${suffix}/ 8 mkdir $base_dir 9 10 FP_exec=/home/ignacio/repos/flexpart/src/FP_ecmwf_gfortran 11 12 #test_dir=$1 13 #FP_exec=$2 14 #base_dir=$3 15 16 ./run_test test_1 /home/ignacio/repos/flexpart/src/FP_ecmwf_gfortran $base_dir 17 ./run_test test_2 /home/ignacio/repos/flexpart/src/FP_ecmwf_gfortran $base_dir 18 19 # 6 species 20 ./run_test test_Volc /home/ignacio/repos/flexpart/src/FP_ecmwf_gfortran $base_dir 22 #tests_dir=tests_${suffix}/ 23 tests_dir=${group_name}_${suffix}/ 24 path_tests=${path_flextest}/$tests_dir 25 mkdir $path_tests 21 26 22 27 23 #exit 28 #declare Bash Array 29 #declare -a test_names=('1' '2' 'HelloWorld') 30 #declare -a test_names=('1' '2' 'HelloWorld' 'Fwd1' 'Fwd2' 'Bwd1' 'Volc') 31 #declare -a test_names=('2' 'Volc') 32 #declare -a test_names=('1' 'HelloWorld' 'Fwd1' 'Fwd2' 'Bwd1' 'Volc' '2') 24 33 25 ./run_test test_HelloWorld /home/ignacio/repos/flexpart/src/FP_ecmwf_gfortran $base_dir 26 ./run_test test_Fwd1 /home/ignacio/repos/flexpart/src/FP_ecmwf_gfortran $base_dir 27 ./run_test test_Fwd2 /home/ignacio/repos/flexpart/src/FP_ecmwf_gfortran $base_dir 34 #blabla 35 #Print the Whole Bash Array 36 s_test_names=${test_names[@]} 37 # Length of the Bash Array 38 n_tests=${#test_names[@]} 39 #echo n_tests=$n_tests 40 echo run $n_tests tests: $s_test_names 41 42 #test 43 #tests_dir='tests_15-08-19_113139/' 44 #path_tests=${path_flextest}/$tests_dir 45 46 47 outlog=stdout.log 48 i=0 49 i_end=$n_tests 50 while [ $i -lt $i_end ] ; 51 do 52 let j=i+1 53 name=${test_names[i]}; 54 echo test no. $j name= $name 55 echo in $path_tests/test_$name 56 ./run_test test_$name $FP_exec $path_tests $options_default 57 echo terminated 58 success="$(cat $path_tests/test_$name/$outlog | grep CONGRATULATIONS | wc -l)" 59 echo success=$success 60 let i=i+1; 61 done 62 63 tot_successes="$(cat $path_tests/test_*/$outlog | grep CONGRATULATIONS | wc -l)" 64 tot_runs="$(ls -1 $path_tests | wc -l)" 65 66 echo ' ' 67 echo finished $tot_runs tests of $n_tests 68 echo $tot_successes seccessful 69 exit 70 71 72 73 74 75 76 77 78 79 80 81 82 83 ./run_test test_1 $FP_exec $path_tests 84 ./run_test test_2 $FP_exec $path_tests 85 # 6 species 86 ./run_test test_Volc $FP_exec $path_tests 87 ./run_test test_HelloWorld $FP_exec $path_tests 88 ./run_test test_Fwd1 $FP_exec $path_tests 89 ./run_test test_Fwd2 $FP_exec $path_tests 90 ./run_test test_Bwd1 $FP_exec $path_tests 91 92
Note: See TracChangeset
for help on using the changeset viewer.