Ignore:
Timestamp:
Apr 26, 2009, 5:35:16 PM (16 years ago)
Author:
rwilson
Message:

Patong beach validation changes plus back-merge changes.

File:
1 edited

Legend:

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

    r6905 r6906  
    4242# as code below depends upon it.
    4343Optional_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'
    4646                        )
    4747
     
    5858OUTDIR_PREFIX = 'Make directory '
    5959
    60 # Name of SWW file produced by simulation
     60# Name of SWW file produced by run_model.py
    6161OUTPUT_SWW = 'patong.sww'
    6262
     
    9393
    9494        if 'DOCTYPE' in data:
    95             return False
    96        
    97         return True
     95            return True
     96       
     97        return False
    9898
    9999   
     
    114114            (result, auth) = get_web_file(remote_url, local, auth=auth)
    115115            if result and is_html(local)==False:
    116                 log.debug('Success fetching file %s' % remote_url)
     116                log.debug('Success fetching file %s' % remote)
    117117                return (True, auth)
    118 
     118            log.debug('Failure fetching from %s' % mirror)
     119
     120        log.debug('Failure fetching file %s' % remote)
    119121        return (False, auth)           
    120122               
     
    162164            (res, auth) = get_remote_from_mirrors(obj_digest, remote_digest, auth, mirrors)
    163165            if res:
    164                 if not files_same(local_data_digest, remote_data_digest):
     166                if not files_same(local_digest, remote_digest):
    165167                    # digests differ, refresh object
    166                     log.info('Local file %s is out of date, refreshing ...' % obj)
    167168                    shutil.move(remote_digest, local_digest)
    168169                    (res, auth) = get_remote_from_mirrors(obj, local_file, auth, mirrors)
     
    269270
    270271    # modify project.py template
     272    log.info('Creating %s version of project.py' % vtype)
    271273    fd = open('project.py.template', 'r')
    272274    project = fd.readlines()
     
    285287
    286288    # run the simulation, produce SWW file
     289    log.info('Running run_model.py')
    287290    cmd = 'python run_model.py > %s' % RUNMODEL_STDOUT
    288291    log.debug("run_simulation: doing '%s'" % cmd)
     
    374377log.console_logging_level = log.INFO
    375378log.log_logging_level = log.DEBUG
     379log_filename = log.log_filename
     380
    376381setup()
    377382
     
    429434        (expected_sww, _) = valid_sww.rsplit('.', 1)
    430435        check_that_output_is_as_expected(expected_sww, valid_sww)
     436    shutil.move(log_filename, '%s.%s' % (log_filename, vtype))
    431437
    432438# clean up
Note: See TracChangeset for help on using the changeset viewer.