Changeset 7267 for anuga_validation/automated_validation_tests
- Timestamp:
- Jun 25, 2009, 3:15:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_validation/automated_validation_tests/patong_beach_validation/validate.py
r7196 r7267 13 13 import time 14 14 import shutil 15 import platform 15 16 16 17 from anuga.utilities.system_tools import get_web_file, untar_file, file_length … … 65 66 OUTPUT_SWW = 'patong.sww' 66 67 68 # default name of python to run 69 PythonName = 'python' 70 67 71 68 72 def setup(): … … 281 285 # modify project.py template 282 286 log.debug("Creating '%s' version of project.py" % vtype) 283 fd = open('project .py.template', 'r')287 fd = open('project_template.py', 'r') 284 288 project = fd.readlines() 285 289 fd.close() … … 298 302 # run the simulation, produce SWW file 299 303 log.info('Running the simulation ...') 300 cmd = ' python run_model.py > %s' % RUNMODEL_STDOUT304 cmd = '%s run_model.py > %s' % (PythonName, RUNMODEL_STDOUT) 301 305 log.debug("run_simulation: doing '%s'" % cmd) 302 306 res = os.system(cmd) … … 345 349 # compare SWW files here and there 346 350 new_output_sww = os.path.join(output_directory, expected_sww) 347 cmd = ' python cmpsww.py %s %s > cmpsww.stdout' % (local_sww, new_output_sww)351 cmd = '%s cmpsww.py %s %s > cmpsww.stdout' % (PythonName, local_sww, new_output_sww) 348 352 log.debug("check_that_output_is_as_expected: doing '%s'" % cmd) 349 353 res = os.system(cmd) … … 376 380 # Mainline - run the simulation, check output. 377 381 ################################################################################ 382 383 # determine what python we are, initialize PythonName 384 py_tuple = platform.python_version_tuple() 385 PythonName = 'python%s.%s' % (py_tuple[0], py_tuple[1]) 378 386 379 387 # set logging levels
Note: See TracChangeset
for help on using the changeset viewer.