Changeset 7641


Ignore:
Timestamp:
Feb 26, 2010, 4:52:46 PM (14 years ago)
Author:
ole
Message:

Repaired patong validate reading output dir. I still think this is hacky.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/data_manager.py

    r7617 r7641  
    69096909
    69106910    # check we have a destination directory, create if necessary
    6911     if access(dir_name, F_OK) == 0:
     6911    if not os.path.isdir(dir_name):
    69126912        if verbose:
    69136913            log.critical('Make directory %s' % dir_name)
    69146914        mkdir(dir_name, 0777)
     6915
     6916    if verbose:
     6917        log.critical('Output directory: %s' % dir_name)       
    69156918
    69166919    copy_file_or_sequence(dir_name, filename1)
  • anuga_validation/automated_validation_tests/patong_beach_validation/compare_model_timeseries.py

    r7640 r7641  
    6767    timevector2, timeseries2 = get_timeseries(swwfile2, gauges)   
    6868
    69     msg = 'Time vector were different in models %s and %s' %\
     69    msg = 'Time vectors were different in models %s and %s' %\
    7070          (swwfile1, swwfile2)
    7171    assert num.allclose(timevector1, timevector2), msg
     
    8282    try:
    8383        res = compare_timeseries(sys.argv[1], sys.argv[2])
    84     except e:
    85         print e
     84    except:
    8685        sys.exit(-1)
    8786    else:
  • anuga_validation/automated_validation_tests/patong_beach_validation/validate.py

    r7640 r7641  
    6565
    6666# text at start of 'output dir' line in RUNMODEL_STDOUT file
    67 OUTDIR_PREFIX = 'Make directory '
     67OUTDIR_PREFIX = 'Output directory: '
    6868
    6969# Name of SWW file produced by run_model.py
     
    335335        if line.startswith(OUTDIR_PREFIX):
    336336            output_directory = line.replace(OUTDIR_PREFIX, '', 1)
    337             output_directory = output_directory.strip('\n')
     337            output_directory = output_directory.strip()
    338338            break
    339339    if output_directory is None:
     
    357357    else:
    358358        log.critical('Simulation results are NOT as expected.')
    359         fd = open('cmpsww.stdout', 'r')
     359        fd = open('compare_model_timeseries.stdout', 'r')
    360360        cmp_error = fd.readlines()
    361361        fd.close()
     
    369369   
    370370    # remove remote directory and stdout capture file
    371     shutil.rmtree(Remote_Data_Directory, ignore_errors=True)
    372     try:
    373         os.remove(RUNMODEL_STDOUT)
    374     except OSError:
    375         pass
     371    #shutil.rmtree(Remote_Data_Directory, ignore_errors=True)
     372    #try:
     373    #    os.remove(RUNMODEL_STDOUT)
     374    #except OSError:
     375    #    pass
    376376           
    377377
Note: See TracChangeset for help on using the changeset viewer.