source: flexpart.git/tests/NILU/run_tests @ f7e8c22

10.4.1_peseiGFS_025bugfixes+enhancementsdevrelease-10release-10.4.1scaling-bug
Last change on this file since f7e8c22 was f7e8c22, checked in by Ignacio Pisso <Ignacio.Pisso@…>, 9 years ago

modify hard paths to nun with Jenkins at NILU

  • Property mode set to 100755
File size: 2.1 KB
Line 
1#!/bin/bash
2
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
10FP_exec=/xnilu_wrk/flexbuild/tests/NILU/FP_ecmwf_gfortran
11#path_flextest=/home/ignacio/repos/flextest/
12path_flextest=/xnilu_wrk/flexbuild/flextest/
13options_default=/xnilu_wrk/flexbuild/flexpart/options/
14#declare -a test_names=('1' 'HelloWorld' 'Fwd1' 'Fwd2' 'Bwd1' 'Volc' '2')
15#test_names[0]='1'
16test_names[0]='HelloWorld' 
17
18group_name=tests
19
20source ./$1
21
22
23suffix=$(date "+%y-%m-%d_%H%M%S")
24#tests_dir=tests_${suffix}/
25tests_dir=${group_name}_${suffix}/
26path_tests=${path_flextest}/$tests_dir
27mkdir $path_tests
28
29
30#declare Bash Array
31#declare -a test_names=('1' '2' 'HelloWorld')
32#declare -a test_names=('1' '2' 'HelloWorld' 'Fwd1' 'Fwd2' 'Bwd1' 'Volc')
33#declare -a test_names=('2' 'Volc')
34#declare -a test_names=('1' 'HelloWorld' 'Fwd1' 'Fwd2' 'Bwd1' 'Volc' '2')
35
36#blabla
37#Print the Whole Bash Array
38s_test_names=${test_names[@]}
39# Length of the Bash Array
40n_tests=${#test_names[@]}
41#echo n_tests=$n_tests
42echo run $n_tests  tests:  $s_test_names
43
44#test
45#tests_dir='tests_15-08-19_113139/'
46#path_tests=${path_flextest}/$tests_dir
47
48
49outlog=stdout.log
50i=0
51i_end=$n_tests
52while [ $i -lt $i_end ] ;
53do
54  let j=i+1
55  name=${test_names[i]};
56  echo test no. $j name= $name
57  echo in $path_tests/test_$name
58  ./run_test test_$name  $FP_exec $path_tests $options_default
59  echo terminated
60  success="$(cat $path_tests/test_$name/$outlog  | grep CONGRATULATIONS  | wc -l)"
61  echo success=$success
62let i=i+1;
63done
64 
65tot_successes="$(cat $path_tests/test_*/$outlog  | grep CONGRATULATIONS  | wc -l)"
66tot_runs="$(ls -1 $path_tests | wc -l)"
67
68echo ' '
69echo finished  $tot_runs tests of $n_tests 
70echo $tot_successes seccessful
71exit
72
73
74
75
76
77
78
79
80
81
82
83
84
85./run_test test_1  $FP_exec $path_tests
86./run_test test_2  $FP_exec $path_tests
87# 6 species
88./run_test test_Volc  $FP_exec $path_tests
89./run_test test_HelloWorld  $FP_exec $path_tests
90./run_test test_Fwd1  $FP_exec $path_tests
91./run_test test_Fwd2  $FP_exec $path_tests
92./run_test test_Bwd1  $FP_exec $path_tests
93
94
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG