diff --git a/python/testsuite.json b/python/testsuite.json deleted file mode 100644 index dda19ad64ec5ef12693aebf2f13b620598b05432..0000000000000000000000000000000000000000 --- a/python/testsuite.json +++ /dev/null @@ -1,79 +0,0 @@ -{ -"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"} -} -} diff --git a/python/testsuite.py b/python/testsuite.py deleted file mode 100755 index d64d51b50eb2e2e122954effcdb0c5f5c0d4053c..0000000000000000000000000000000000000000 --- a/python/testsuite.py +++ /dev/null @@ -1,87 +0,0 @@ -#!/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('\nFAILED\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'