Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flexpart
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin Püschel
Flexpart
Commits
ee5ff31f
Commit
ee5ff31f
authored
9 years ago
by
Ignacio Pisso
Browse files
Options
Downloads
Plain Diff
merge master into master_in_yosemite
parents
260023b2
06314902
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+4
-1
4 additions, 1 deletion
.gitignore
tests/NILU/run_test
+28
-6
28 additions, 6 deletions
tests/NILU/run_test
tests/NILU/run_tests
+8
-6
8 additions, 6 deletions
tests/NILU/run_tests
with
40 additions
and
13 deletions
.gitignore
+
4
−
1
View file @
ee5ff31f
FP_ecmwf_gfortran*
FP_ecmwf_gfortran*
*.o
*.o
*
_mod
.mod
*.mod
.DS_Store
.DS_Store
output
output
src/FLEXPART_*
fort.*
CONVERT2
FLEXPART_laptop
FLEXPART_laptop
This diff is collapsed.
Click to expand it.
tests/NILU/run_test
+
28
−
6
View file @
ee5ff31f
...
@@ -5,9 +5,20 @@ test_dir=$1 # name of dir with pathname and options to be used
...
@@ -5,9 +5,20 @@ test_dir=$1 # name of dir with pathname and options to be used
FP_exec
=
$2
# path to executable to be run
FP_exec
=
$2
# path to executable to be run
base_dir
=
$3
# base for the output
base_dir
=
$3
# base for the output
options_default
=
$4
options_default
=
$4
echo
run
test
'>'
input
echo
$1
echo
$2
echo
$3
echo
$4
# echo name= $name
# echo working dir= $path_tests/test_$name
# echo executable= $FP_exec
# echo default options from $options_default
#echo FP_exec=$FP_exec
#echo FP_exec=$FP_exec
echo
$FLEXOUT_T
M
P
echo
env
var
FLEXOUT_TMP
=
$FLEXOUT_TP
#suffix=$(date "+%y-%m-%d_%H%M%S")
#suffix=$(date "+%y-%m-%d_%H%M%S")
test_tmp
=
${
FLEXOUT_TMP
}${
base_dir
}${
test_dir
}
test_tmp
=
${
FLEXOUT_TMP
}${
base_dir
}${
test_dir
}
...
@@ -17,15 +28,24 @@ current_dir=$(pwd)
...
@@ -17,15 +28,24 @@ current_dir=$(pwd)
#echo test_tmp=$test_tmp
#echo test_tmp=$test_tmp
mkdir
$test_tmp
mkdir
$test_tmp
echo
copy default options
$options_default
to temp
dir
$test_tmp
/options
echo
run
test
'>'
copy default options to temp
dir
echo
from
$options_default
to
$test_tmp
/options
cp
-r
$options_default
$test_tmp
/options
cp
-r
$options_default
$test_tmp
/options
#override default options
#override default options
echo
copy this
test
option files to temp
dir
echo
copy
test
options files to temp
dir
cp
${
test_dir
}
/options/
*
$test_tmp
/options/
echo
${
test_dir
}
/options/
*
$test_tmp
/options/
echo
copy SPECIES from
${
test_dir
}
/options/SPECIES/
*
to
$test_tmp
/options/SPECIES/
cp
${
test_dir
}
/options/
*
$test_tmp
/options/
cp
${
test_dir
}
/options/SPECIES/
*
$test_tmp
/options/SPECIES/
echo
copy
test
options/SPECIES to temp
dir
if
needed
if
[
-d
"
${
test_dir
}
/options/SPECIES"
]
;
then
echo
from
${
test_dir
}
/options/SPECIES/
*
to
$test_tmp
/options/SPECIES/
cp
${
test_dir
}
/options/SPECIES/
*
$test_tmp
/options/SPECIES/
fi
# copy paths form repo source exec tmp dir
# copy paths form repo source exec tmp dir
echo
copy
test
pathnames to temp
dir
cp
${
test_dir
}
/pathnames
$test_tmp
cp
${
test_dir
}
/pathnames
$test_tmp
echo
create output
dir
${
test_tmp
}
/output
mkdir
${
test_tmp
}
/output
mkdir
${
test_tmp
}
/output
#cp test_1/run $test_tmp
#cp test_1/run $test_tmp
...
@@ -36,7 +56,9 @@ cd $test_tmp
...
@@ -36,7 +56,9 @@ cd $test_tmp
# '&>' o is bash for both out and err
# '&>' o is bash for both out and err
#echo run $FP_exec to out.log #&
#echo run $FP_exec to out.log #&
#$FP_exec &> out.log #&
#$FP_exec &> out.log #&
echo
execute
test
$FP_exec
>
stdout.log 2> stderr.log
#&
$FP_exec
>
stdout.log 2> stderr.log
#&
echo
flexpart terminated
This diff is collapsed.
Click to expand it.
tests/NILU/run_tests
+
8
−
6
View file @
ee5ff31f
...
@@ -36,14 +36,13 @@ mkdir $path_tests
...
@@ -36,14 +36,13 @@ mkdir $path_tests
#declare -a test_names=('2' 'Volc')
#declare -a test_names=('2' 'Volc')
#declare -a test_names=('1' 'HelloWorld' 'Fwd1' 'Fwd2' 'Bwd1' 'Volc' '2')
#declare -a test_names=('1' 'HelloWorld' 'Fwd1' 'Fwd2' 'Bwd1' 'Volc' '2')
#blabla
#Print the Whole Bash Array
#Print the Whole Bash Array
s_test_names
=
${
test_names
[@]
}
s_test_names
=
${
test_names
[@]
}
# Length of the Bash Array
# Length of the Bash Array
n_tests
=
${#
test_names
[@]
}
n_tests
=
${#
test_names
[@]
}
#echo n_tests=$n_tests
#echo n_tests=$n_tests
echo
run
$n_tests
tests:
$s_test_names
echo
run
$s_test_names
echo
total
$n_tests
tests
#test
#test
#tests_dir='tests_15-08-19_113139/'
#tests_dir='tests_15-08-19_113139/'
#path_tests=${path_flextest}/$tests_dir
#path_tests=${path_flextest}/$tests_dir
...
@@ -56,10 +55,13 @@ while [ $i -lt $i_end ] ;
...
@@ -56,10 +55,13 @@ while [ $i -lt $i_end ] ;
do
do
let
j
=
i+1
let
j
=
i+1
name
=
${
test_names
[i]
}
;
name
=
${
test_names
[i]
}
;
echo test
no.
$j
name
=
$name
echo
run
test
no.
$j
echo
in
$path_tests
/test_
$name
# echo name= $name
# echo working dir= $path_tests/test_$name
# echo executable= $FP_exec
# echo default options from $options_default
./run_test test_
$name
$FP_exec
$path_tests
$options_default
./run_test test_
$name
$FP_exec
$path_tests
$options_default
echo
terminated
echo
test
$name
terminated
success
=
"
$(
cat
$path_tests
/test_
$name
/
$outlog
|
grep
CONGRATULATIONS |
wc
-l
)
"
success
=
"
$(
cat
$path_tests
/test_
$name
/
$outlog
|
grep
CONGRATULATIONS |
wc
-l
)
"
echo
success
=
$success
echo
success
=
$success
let
i
=
i+1
;
let
i
=
i+1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment