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

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

Modified NILU tests to work with unified executable

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