Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flex Extract
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
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
Flexpart
Flex Extract
Commits
8416dd15
Commit
8416dd15
authored
6 years ago
by
anphi
Browse files
Options
Downloads
Patches
Plain Diff
deletedt json testsuite
parent
8255fce8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/testsuite.json
+0
-79
0 additions, 79 deletions
python/testsuite.json
python/testsuite.py
+0
-87
0 additions, 87 deletions
python/testsuite.py
with
0 additions
and
166 deletions
python/testsuite.json
deleted
100644 → 0
+
0
−
79
View file @
8255fce8
{
"install"
:
{
"script"
:
"install.py"
,
"control"
:
null
,
"inputdir"
:
null
,
"ecuid"
:
"lh0"
,
"ecgid"
:
"spatlh00"
,
"gateway"
:
"srvx7.img.univie.ac.at"
,
"destination"
:
"leo@genericSftp"
,
"local"
:
{
"target"
:
"local"
},
"local_flexpart"
:
{
"target"
:
"local"
,
"flexpart_root_scripts"
:
"$FLEXPART_ROOT_SCRIPTS"
},
"ecgate"
:
{
"target"
:
"ecgate"
},
"cca"
:
{
"target"
:
"cca"
}
},
"default"
:
{
"script"
:
"submit.py"
,
"control"
:
null
,
"inputdir"
:
null
,
"start_date"
:
"20131107"
,
"local"
:
{},
"local_flexpart"
:
{
"flexpart_root_scripts"
:
"$FLEXPART_ROOT_SCRIPTS"
},
"ecgate"
:
{
"queue"
:
"ecgate"
},
"cca"
:
{
"queue"
:
"cca"
}
},
"work"
:
{
"script"
:
"submit.py"
,
"control"
:
null
,
"start_date"
:
"20131107"
,
"inputdir"
:
"$SCRATCH/work"
,
"local_flexpart"
:
{
"flexpart_root_scripts"
:
"$FLEXPART_ROOT_SCRIPTS"
}
},
"fc"
:
{
"script"
:
"submit.py"
,
"control"
:
"CONTROL_FC.pure"
,
"inputdir"
:
"$SCRATCH/workfc"
,
"local_flexpart"
:
{
"flexpart_root_scripts"
:
"$FLEXPART_ROOT_SCRIPTS"
}
},
"cv"
:
{
"script"
:
"submit.py"
,
"control"
:
"CONTROL_CV"
,
"inputdir"
:
"$SCRATCH/workcv"
,
"start_date"
:
"20131107"
,
"local_flexpart"
:
{
"flexpart_root_scripts"
:
"$FLEXPART_ROOT_SCRIPTS"
}
},
"hireseta"
:
{
"script"
:
"submit.py"
,
"control"
:
"CONTROL_OD.highres.eta"
,
"inputdir"
:
"$SCRATCH/workhireseta"
,
"local_flexpart"
:
{
"flexpart_root_scripts"
:
"$FLEXPART_ROOT_SCRIPTS"
},
"ecgate"
:
{
"queue"
:
"ecgate"
}
},
"hiresgauss"
:
{
"script"
:
"submit.py"
,
"control"
:
"CONTROL_OD.highres.gauss"
,
"inputdir"
:
"$SCRATCH/workhiresgauss"
,
"basetime"
:
"00"
,
"local_flexpart"
:
{
"flexpart_root_scripts"
:
"$FLEXPART_ROOT_SCRIPTS"
},
"ecgate"
:
{
"queue"
:
"ecgate"
},
"cca"
:
{
"queue"
:
"cca"
}
},
"ops"
:
{
"script"
:
"submit.py"
,
"start_date"
:
"20131108"
,
"control"
:
"CONTROL_OPS.4V"
,
"inputdir"
:
"$SCRATCH/workops2"
,
"local_flexpart"
:
{
"basetime"
:
"00"
},
"local_flexpart12"
:
{
"basetime"
:
"12"
},
"ecgate"
:
{
"queue"
:
"ecgate"
,
"basetime"
:
"00"
}
},
"opsfc"
:
{
"script"
:
"submit.py"
,
"start_date"
:
"20131108"
,
"control"
:
"CONTROL_OPS"
,
"inputdir"
:
"$SCRATCH/workopsfc"
,
"local_flexpart"
:
{
"basetime"
:
"00"
},
"local_flexpart12"
:
{
"basetime"
:
"12"
},
"ecgate"
:
{
"queue"
:
"ecgate"
,
"basetime"
:
"00"
}
}
}
This diff is collapsed.
Click to expand it.
python/testsuite.py
deleted
100755 → 0
+
0
−
87
View file @
8255fce8
#!/usr/bin/env python
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# Leopold Haimberger, Dec 2015
#
# Functionality provided: This script triggers the flex_extract test suite. Call with
# testsuite.py [test group]
#
#
# Further documentation may be obtained from www.flexpart.eu
#
# Test groups are specified in testsuite.json
# in addition to a standard python 2.6 or 2.7 installation the following packages need to be installed
# ECMWF WebMARS, gribAPI with python enabled, emoslib, ecaccess web toolkit, all available from https://software.ecmwf.int/
# dateutils
# matplotlib (optional, for debugging)
import
os
,
sys
import
json
import
subprocess
try
:
taskfile
=
open
(
'
testsuite.json
'
)
except
:
print
'
could not open suite definition file testsuite.json
'
exit
()
if
not
os
.
path
.
isfile
(
'
../src/CONVERT2
'
):
print
'
../src/CONVERT2 could not be found
'
print
'
please run
"
install.py --target=local
"
first
'
exit
()
fprs
=
os
.
getenv
(
'
FLEXPART_ROOT_SCRIPTS
'
)
if
fprs
is
None
:
print
'
FLEXPART_ROOT_SCRIPTS not set .. some test jobs may fail
'
tasks
=
json
.
load
(
taskfile
,
encoding
=
'
latin-1
'
)
taskfile
.
close
()
if
not
os
.
path
.
exists
(
'
../test
'
):
os
.
makedirs
(
'
../test
'
)
if
len
(
sys
.
argv
)
>
1
:
groups
=
sys
.
argv
[
1
:]
else
:
groups
=
[
'
install
'
,
'
default
'
,
'
ops
'
,
'
work
'
,
'
cv
'
,
'
fc
'
,
'
hireseta
'
,
'
highresgauss
'
,
'
opsfc
'
]
jobcounter
=
0
jobfailed
=
0
for
g
in
groups
:
try
:
tk
,
tv
=
g
,
tasks
[
g
]
except
:
continue
garglist
=
[]
for
ttk
,
ttv
in
tv
.
iteritems
():
if
isinstance
(
ttv
,
basestring
):
if
ttk
!=
'
script
'
:
garglist
.
append
(
'
--
'
+
ttk
)
if
'
$
'
==
ttv
[
0
]:
garglist
.
append
(
os
.
path
.
expandvars
(
ttv
))
else
:
garglist
.
append
(
ttv
)
for
ttk
,
ttv
in
tv
.
iteritems
():
if
isinstance
(
ttv
,
dict
):
arglist
=
[]
for
tttk
,
tttv
in
ttv
.
iteritems
():
if
isinstance
(
tttv
,
basestring
):
arglist
.
append
(
'
--
'
+
tttk
)
if
'
$
'
in
tttv
[
0
]:
arglist
.
append
(
os
.
path
.
expandvars
(
tttv
))
else
:
arglist
.
append
(
tttv
)
print
'
Command:
'
,
'
'
.
join
([
tv
[
'
script
'
]]
+
garglist
+
arglist
)
o
=
'
../test/
'
+
tk
+
'
_
'
+
ttk
+
'
_
'
+
'
_
'
.
join
(
ttv
.
keys
())
print
'
Output will be sent to
'
,
o
f
=
open
(
o
,
'
w
'
)
try
:
p
=
subprocess
.
check_call
([
tv
[
'
script
'
]]
+
garglist
+
arglist
,
stdout
=
f
,
stderr
=
f
)
except
:
f
.
write
(
'
\n
FAILED
\n
'
)
print
'
FAILED
'
jobfailed
+=
1
jobcounter
+=
1
f
.
close
()
print
'
Test suite tasks completed
'
print
str
(
jobcounter
-
jobfailed
)
+
'
successful,
'
+
str
(
jobfailed
)
+
'
failed
'
print
'
If tasks have been submitted via ECACCESS please check emails
'
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