Changeset 6912


Ignore:
Timestamp:
Apr 28, 2009, 11:53:56 AM (14 years ago)
Author:
rwilson
Message:

Changes to debugging level of many statements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy_anuga_validation/automated_validation_tests/patong_beach_validation/validate.py

    r6907 r6912  
    270270
    271271    # modify project.py template
    272     log.info('Creating %s version of project.py' % vtype)
     272    log.debug("Creating '%s' version of project.py" % vtype)
    273273    fd = open('project.py.template', 'r')
    274274    project = fd.readlines()
     
    287287
    288288    # run the simulation, produce SWW file
    289     log.info('Running run_model.py')
     289    log.debug('Running run_model.py')
    290290    cmd = 'python run_model.py > %s' % RUNMODEL_STDOUT
    291291    log.debug("run_simulation: doing '%s'" % cmd)
     
    339339    res = os.system(cmd)
    340340    log.debug("check_that_output_is_as_expected: res=%d" % res)
     341    log.critical()
    341342    if res == 0:
    342343        log.info('Simulation results are as expected.')
     
    346347        cmp_error = fd.readlines()
    347348        fd.close()
    348         log.critical('\n' + ''.join(cmp_error))
     349        log.critical(''.join(cmp_error))
    349350
    350351
     
    354355    log.debug('teardown: called')
    355356   
    356 ##    # clear all data objects from local data directory
    357 ##    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 
    364357    # remove remote directory and stdout capture file
    365358    shutil.rmtree(Remote_Data_Directory, ignore_errors=True)
     
    426419# now run what simulations we can and check output is as expected
    427420for odo in Optional_Data_Objects:
     421    start_time = time.time()
    428422    (_, vtype, _) = odo.rsplit('.', 2)
    429423    vtype = vtype.lower()
    430     log.critical('#' * 50)
     424    log.critical('#' * 72)
    431425    log.critical("Running Patong '%s' validation ..." % vtype)
    432426    if run_simulation(vtype, odo):
     
    436430        check_that_output_is_as_expected(expected_sww, valid_sww)
    437431    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))
    438434
    439435# clean up
Note: See TracChangeset for help on using the changeset viewer.