forked from neams-th-coe/cardinal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests
executable file
·23 lines (18 loc) · 983 Bytes
/
run_tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python
import sys, os
# check that the cross section library for the test suite is being used
xs = os.environ.get('OPENMC_CROSS_SECTIONS')
if (xs):
print("Using cross section library:", xs)
if (not "endfb-vii.1-hdf5" in xs):
print("\nCardinal's test suite must be run with the ENDF/B-7.1 library. " \
"To download the paired library, " \
"run: ./scripts/download-openmc-cross-sections.sh " \
"and export OPENMC_CROSS_SECTIONS to the location of the cross_sections.xml file.")
MOOSE_DIR = os.path.abspath(os.environ.get('MOOSE_DIR', os.path.join(os.path.dirname(__file__), '..', 'moose')))
if os.path.exists(os.path.abspath(os.path.join('contrib', 'moose', 'framework', 'Makefile'))):
MOOSE_DIR = os.path.abspath(os.path.join('contrib', 'moose'))
MOOSE_DIR = os.environ.get('MOOSE_DIR', MOOSE_DIR)
sys.path.append(os.path.join(MOOSE_DIR, 'python'))
from TestHarness import TestHarness
TestHarness.buildAndRun(sys.argv, None, MOOSE_DIR)