diff --git a/tests/run_tests.py b/tests/run_tests.py index b10225f7fa..30d330e5d5 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -87,11 +87,11 @@ if len(sys.argv) > 1: if i == 'all-tests': tests__ = tests try: - idx = tests_.index('compile') # check for compile test + idx = tests_.index('compile') # check for compile test except ValueError: del tests__[0] finally: - break # don't need to check for anything else + break # don't need to check for anything else # This checks for any subsets of tests. The string after # all-XXXX will be used to search through all tests. @@ -109,7 +109,7 @@ if len(sys.argv) > 1: if j.rfind(suffix) != -1: tests__.append(j) else: - tests__.append(i) # append specific test (e.g., mpi-debug) + tests__.append(i) # append specific test (e.g., mpi-debug) tests = tests__ if tests__ else tests # Run tests diff --git a/tests/test_compile/test_compile.py b/tests/test_compile/test_compile.py index bc3b2391d6..997f243d7b 100644 --- a/tests/test_compile/test_compile.py +++ b/tests/test_compile/test_compile.py @@ -59,18 +59,21 @@ def test_mpi(): assert returncode == 0 shutil.move('openmc', 'openmc-mpi') + def test_mpi_debug(): - returncode = run(['make','distclean']) + returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'MPI=yes', 'DEBUG=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-mpi-debug') + def test_mpi_optimize(): - returncode = run(['make','distclean']) + returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'MPI=yes', 'OPTIMIZE=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-mpi-optimize') + def test_omp(): returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'OPENMP=yes']) @@ -84,36 +87,43 @@ def test_hdf5(): assert returncode == 0 shutil.move('openmc', 'openmc-hdf5') + def test_hdf5_debug(): - returncode = run(['make','distclean']) + returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'HDF5=yes', 'DEBUG=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-hdf5-debug') + def test_hdf5_optimize(): - returncode = run(['make','distclean']) + returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'HDF5=yes', 'OPTIMIZE=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-hdf5-optimize') + def test_petsc(): returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'MPI=yes', 'PETSC=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-petsc') + def test_petsc_debug(): - returncode = run(['make','distclean']) + returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'MPI=yes', 'PETSC=yes', 'DEBUG=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-petsc-debug') + def test_petsc_optimize(): - returncode = run(['make','distclean']) - returncode = run(['make', compiler, 'MPI=yes', 'PETSC=yes', 'OPTIMIZE=yes']) + returncode = run(['make', 'distclean']) + returncode = run(['make', compiler, 'MPI=yes', 'PETSC=yes', + 'OPTIMIZE=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-petsc-optimize') + def test_mpi_omp(): returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'MPI=yes', 'OPENMP=yes']) @@ -127,36 +137,43 @@ def test_omp_hdf5(): assert returncode == 0 shutil.move('openmc', 'openmc-omp-hdf5') + def test_mpi_hdf5(): returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-phdf5') + def test_mpi_hdf5_debug(): - returncode = run(['make','distclean']) + returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'DEBUG=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-phdf5-debug') + def test_mpi_hdf5_optimize(): - returncode = run(['make','distclean']) + returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'OPTIMIZE=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-phdf5-optimize') + def test_mpi_hdf5_petsc(): returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'PETSC=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-phdf5-petsc') + def test_mpi_hdf5_petsc_debug(): - returncode = run(['make','distclean']) - returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'PETSC=yes', 'DEBUG=yes']) + returncode = run(['make', 'distclean']) + returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'PETSC=yes', + 'DEBUG=yes']) assert returncode == 0 shutil.move('openmc', 'openmc-phdf5-petsc-debug') + def test_mpi_hdf5_petsc_optimize(): returncode = run(['make', 'distclean']) returncode = run(['make', compiler, 'MPI=yes', 'HDF5=yes', 'PETSC=yes',