Changeset ff99eae in flex_extract.git for python/test_suite.py
- Timestamp:
- Jun 1, 2018, 8:34:59 PM (6 years ago)
- Branches:
- master, ctbto, dev
- Children:
- e1228f3
- Parents:
- ccab809
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
python/test_suite.py
r991df6a rff99eae 2 2 # -*- coding: utf-8 -*- 3 3 #************************************************************************ 4 # TODO AP 5 # 4 # ToDo AP 6 5 # - provide more tests 7 6 # - provide more documentation 8 # -9 7 #************************************************************************ 10 8 … … 28 26 # @Program Functionality: 29 27 # This script triggers the ECMWFDATA test suite. Call with 30 # test suite.py [test group]28 # test_suite.py [test group] 31 29 # 32 30 # @Program Content: … … 46 44 # ------------------------------------------------------------------------------ 47 45 try: 48 taskfile = open('test suite.json')49 except :50 print 'could not open suite definition file test suite.json'46 taskfile = open('test_suite.json') 47 except IOError: 48 print 'could not open suite definition file test_suite.json' 51 49 exit() 52 50 … … 73 71 try: 74 72 tk, tv = g, tasks[g] 75 except:76 continue73 finally: 74 pass 77 75 garglist = [] 78 76 for ttk, ttv in tv.iteritems(): … … 80 78 if ttk != 'script': 81 79 garglist.append('--' + ttk) 82 if '$' == ttv[0]:80 if ttv[0] == '$': 83 81 garglist.append(os.path.expandvars(ttv)) 84 82 else: … … 89 87 for tttk, tttv in ttv.iteritems(): 90 88 if isinstance(tttv, basestring): 91 92 93 94 95 89 arglist.append('--' + tttk) 90 if '$' in tttv[0]: 91 arglist.append(os.path.expandvars(tttv)) 92 else: 93 arglist.append(tttv) 96 94 print 'Command: ', ' '.join([tv['script']] + garglist + arglist) 97 95 o = '../test/' + tk + '_' + ttk + '_' + '_'.join(ttv.keys()) … … 101 99 p = subprocess.check_call([tv['script']] + garglist + arglist, 102 100 stdout=f, stderr=f) 103 except :101 except subprocess.CalledProcessError as e: 104 102 f.write('\nFAILED\n') 105 103 print 'FAILED' … … 111 109 print str(jobcounter-jobfailed) + ' successful, ' + str(jobfailed) + ' failed' 112 110 print 'If tasks have been submitted via ECACCESS please check emails' 113 114 #print tasks
Note: See TracChangeset
for help on using the changeset viewer.