Changeset 6912
- Timestamp:
- Apr 28, 2009, 11:53:56 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation/validate.py
r6907 r6912 270 270 271 271 # modify project.py template 272 log. info('Creating %s version of project.py'% vtype)272 log.debug("Creating '%s' version of project.py" % vtype) 273 273 fd = open('project.py.template', 'r') 274 274 project = fd.readlines() … … 287 287 288 288 # run the simulation, produce SWW file 289 log. info('Running run_model.py')289 log.debug('Running run_model.py') 290 290 cmd = 'python run_model.py > %s' % RUNMODEL_STDOUT 291 291 log.debug("run_simulation: doing '%s'" % cmd) … … 339 339 res = os.system(cmd) 340 340 log.debug("check_that_output_is_as_expected: res=%d" % res) 341 log.critical() 341 342 if res == 0: 342 343 log.info('Simulation results are as expected.') … … 346 347 cmp_error = fd.readlines() 347 348 fd.close() 348 log.critical(' \n' + ''.join(cmp_error))349 log.critical(''.join(cmp_error)) 349 350 350 351 … … 354 355 log.debug('teardown: called') 355 356 356 ## # clear all data objects from local data directory357 ## for data_object in Local_Data_Objects:358 ## obj_path = os.path.join(Local_Data_Directory, data_object)359 ## if os.path.isfile(obj_path):360 ## os.remove(obj_path)361 ## else:362 ## shutil.rmtree(obj_path, ignore_errors=True)363 364 357 # remove remote directory and stdout capture file 365 358 shutil.rmtree(Remote_Data_Directory, ignore_errors=True) … … 426 419 # now run what simulations we can and check output is as expected 427 420 for odo in Optional_Data_Objects: 421 start_time = time.time() 428 422 (_, vtype, _) = odo.rsplit('.', 2) 429 423 vtype = vtype.lower() 430 log.critical('#' * 50)424 log.critical('#' * 72) 431 425 log.critical("Running Patong '%s' validation ..." % vtype) 432 426 if run_simulation(vtype, odo): … … 436 430 check_that_output_is_as_expected(expected_sww, valid_sww) 437 431 shutil.move(log_filename, '%s.%s' % (log_filename, vtype)) 432 stop_time = time.time() 433 log.critical('%s validation took %.1fs' % (stop_time - start_time)) 438 434 439 435 # clean up
Note: See TracChangeset
for help on using the changeset viewer.