Changeset 6906 for branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation/validate.py
- Timestamp:
- Apr 26, 2009, 5:35:16 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation/validate.py
r6905 r6906 42 42 # as code below depends upon it. 43 43 Optional_Data_Objects = ('patong.sww.TRIAL.tgz', 44 'patong.sww.BASIC.tgz',45 'patong.sww.FINAL.tgz'44 # 'patong.sww.BASIC.tgz', 45 # 'patong.sww.FINAL.tgz' 46 46 ) 47 47 … … 58 58 OUTDIR_PREFIX = 'Make directory ' 59 59 60 # Name of SWW file produced by simulation60 # Name of SWW file produced by run_model.py 61 61 OUTPUT_SWW = 'patong.sww' 62 62 … … 93 93 94 94 if 'DOCTYPE' in data: 95 return False96 97 return True95 return True 96 97 return False 98 98 99 99 … … 114 114 (result, auth) = get_web_file(remote_url, local, auth=auth) 115 115 if result and is_html(local)==False: 116 log.debug('Success fetching file %s' % remote _url)116 log.debug('Success fetching file %s' % remote) 117 117 return (True, auth) 118 118 log.debug('Failure fetching from %s' % mirror) 119 120 log.debug('Failure fetching file %s' % remote) 119 121 return (False, auth) 120 122 … … 162 164 (res, auth) = get_remote_from_mirrors(obj_digest, remote_digest, auth, mirrors) 163 165 if res: 164 if not files_same(local_d ata_digest, remote_data_digest):166 if not files_same(local_digest, remote_digest): 165 167 # digests differ, refresh object 166 log.info('Local file %s is out of date, refreshing ...' % obj)167 168 shutil.move(remote_digest, local_digest) 168 169 (res, auth) = get_remote_from_mirrors(obj, local_file, auth, mirrors) … … 269 270 270 271 # modify project.py template 272 log.info('Creating %s version of project.py' % vtype) 271 273 fd = open('project.py.template', 'r') 272 274 project = fd.readlines() … … 285 287 286 288 # run the simulation, produce SWW file 289 log.info('Running run_model.py') 287 290 cmd = 'python run_model.py > %s' % RUNMODEL_STDOUT 288 291 log.debug("run_simulation: doing '%s'" % cmd) … … 374 377 log.console_logging_level = log.INFO 375 378 log.log_logging_level = log.DEBUG 379 log_filename = log.log_filename 380 376 381 setup() 377 382 … … 429 434 (expected_sww, _) = valid_sww.rsplit('.', 1) 430 435 check_that_output_is_as_expected(expected_sww, valid_sww) 436 shutil.move(log_filename, '%s.%s' % (log_filename, vtype)) 431 437 432 438 # clean up
Note: See TracChangeset
for help on using the changeset viewer.