updated test cases to work with MPI and HDF5, all run from run_tests script

This commit is contained in:
Bryan Herman 2013-08-22 12:17:28 -04:00
parent 1ba465b4fc
commit f22adabf15
130 changed files with 1447 additions and 496 deletions

View file

@ -2,6 +2,7 @@
import os
from subprocess import Popen, STDOUT, PIPE
from nose_mpi import NoseMPI
pwd = os.path.dirname(__file__)
@ -10,7 +11,12 @@ def setup():
os.chdir(pwd)
def test_run():
proc = Popen([pwd + '/../../src/openmc', '-p'], stderr=STDOUT, stdout=PIPE)
openmc_path = pwd + '/../../src/openmc'
if int(NoseMPI.mpi_np) > 0:
proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path, '-p'],
stderr=STDOUT, stdout=PIPE)
else:
proc = Popen([openmc_path, '-p'], stderr=STDOUT, stdout=PIPE)
returncode = proc.wait()
print(proc.communicate()[0])
assert returncode == 0