Changeset 20411
- Timestamp:
- 03/31/16 14:18:06 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/runme.py
r20182 r20411 1 #! 1 #!/usr/bin/env python 2 2 import os 3 3 import glob … … 6 6 import netCDF4 7 7 import sys 8 import traceback 8 9 9 10 def runme(id=None,exclude=None,benchmark='nightly',procedure='check',output='none',rank=1,numprocs=1): … … 63 64 # }}} 64 65 #GET output {{{ 65 if not ismember(output,['nightly',' daily','none']):66 if not ismember(output,['nightly','none']): 66 67 print "runme warning: output '%s' not supported, defaulting to test 'none'." % output 67 68 output='none' … … 199 200 (error_diff,tolerance,id,id_string,fieldname) 200 201 201 except Exception as me 2:202 except Exception as message: 202 203 203 204 #something went wrong, print failure message: 205 print traceback.format_exc() 204 206 directory=os.getcwd().split('/') # not used? 205 message=me2206 207 if strcmpi(output,'nightly'): 207 208 fid=open(os.path.join(ISSM_DIR,'nightlylog','pythonerror.log'), 'a') … … 210 211 fid.close() 211 212 print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,fieldname) 212 elif strcmpi(output,'daily'):213 fid=open(os.path.join(ISSM_DIR,'dailylog','pythonerror.log'), 'a')214 fid.write('%s' % message)215 fid.write('\n------------------------------------------------------------------\n')216 fid.close()217 print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,fieldname)218 213 else: 219 214 print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,fieldname) … … 222 217 f.close() 223 218 224 except Exception as me :219 except Exception as message: 225 220 226 221 #something went wrong, print failure message: 222 print traceback.format_exc() 227 223 directory=os.getcwd().split('/') # not used? 228 message=me229 224 if strcmpi(output,'nightly'): 230 225 fid=open(os.path.join(ISSM_DIR,'nightlylog','pythonerror.log'), 'a') 231 fid.write('%s' % message)232 fid.write('\n------------------------------------------------------------------\n')233 fid.close()234 print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,'N/A')235 elif strcmpi(output,'daily'):236 fid=open(os.path.join(ISSM_DIR,'dailylog','pythonerror.log'), 'a')237 226 fid.write('%s' % message) 238 227 fid.write('\n------------------------------------------------------------------\n')
Note:
See TracChangeset
for help on using the changeset viewer.