Changeset 6808
- Timestamp:
- Apr 15, 2009, 9:40:55 AM (16 years ago)
- Location:
- branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation/cmpsww.py
r6789 r6808 346 346 timesteps=timesteps, variables=variables) 347 347 except RuntimeError, msg: 348 print >>sys.stderr, msg 348 print msg 349 return 10 349 350 350 351 -
branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation/validate_patong.py
r6788 r6808 19 19 20 20 # base URL for the remote ANUGA data 21 PATONG_DATA_URL = 'http://10.7.64.243/patong_validation_data/' 21 PATONG_HOST = 'http://10.7.64.243/' 22 PATONG_DATA_URL = PATONG_HOST + 'patong_validation_data/' 22 23 23 24 # path to the local data directory … … 150 151 151 152 Return True if we *can* run, else False. 153 154 Tell user what is happening first, then untar files. 152 155 ''' 153 156 154 157 log.critical('Checking if you have the required files ...') 158 159 have_files = True 160 max_width = 0 161 for obj in Local_Data_Objects: 162 max_width = max(len(obj), max_width) 155 163 156 164 for obj in Local_Data_Objects: … … 158 166 obj_path = os.path.join(Local_Data_Directory, obj+'.tgz') 159 167 if os.path.exists(obj_path): 160 log.debug('Untarring %s in directory %s' 161 % (obj_path, Local_Data_Directory)) 162 untar_file(obj_path, target_dir=Local_Data_Directory) 168 log.info('%s found' % obj.ljust(max_width)) 163 169 else: 164 return False 165 166 log.critical('You appear to have the required files here, ' 167 'continuing the validation.') 170 log.info('%s MISSING!' % obj.ljust(max_width)) 171 have_files = False 172 173 if not have_files: 174 log.critical('You must obtain the missing files before you can run ' 175 'this validation.') 176 return False 177 178 log.critical('You have the required files.') 179 180 # now untar file/directory objects 181 for obj in Local_Data_Objects: 182 log.debug('Untarring %s in directory %s' 183 % (obj_path, Local_Data_Directory)) 184 untar_file(obj_path, target_dir=Local_Data_Directory) 185 168 186 return True 169 187 … … 223 241 else: 224 242 log.critical('Simulation results are NOT as expected.') 243 fd = open('cmpsww.stdout', 'r') 244 cmp_error = fd.readlines() 245 fd.close() 246 log.critical('\n' + ''.join(cmp_error)) 225 247 226 248 … … 283 305 log.critical('Terminating the validation.') 284 306 log.critical('') 285 log.critical('If you get these files from %s:' % PATONG_DATA_URL) 286 for obj in Local_Data_Objects: 287 log.critical(' %s.tgz' % obj) 307 log.critical('If you get the missing files from %s' % PATONG_DATA_URL) 288 308 log.critical('then you can try to run the validation again.') 289 309 sys.exit(10)
Note: See TracChangeset
for help on using the changeset viewer.