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

10.4.1_peseiGFS_025bugfixes+enhancementsdevrelease-10release-10.4.1scaling-bugunivie
Last change on this file since ca350ba was ca350ba, checked in by Espen Sollum ATMOS <eso@…>, 8 years ago

Add tests from master branch (9.2) to dev (10.0)

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