forked from idaholab/magpie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests
executable file
·27 lines (21 loc) · 1.03 KB
/
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
24
25
26
27
#!/usr/bin/env python
import sys, os, inspect
# Set the current working directory to the directory where this script is located
os.chdir(os.path.abspath(os.path.dirname(sys.argv[0])))
os.putenv("ENDF_FP_DIR", os.path.abspath(os.path.dirname(sys.argv[0])) + "/data/fission_yield/")
os.putenv("ALPHA_DIR", os.path.abspath(os.path.dirname(sys.argv[0])) + "/data/alpha_decay/")
#### Set the name of the application here and moose directory relative to the application
app_name = 'magpie'
MOOSE_DIR = os.path.abspath(os.path.join('..', 'moose'))
#### See if a submodule is available
if os.path.exists(os.path.abspath(os.path.join('moose', 'framework', 'Makefile'))):
MOOSE_DIR = os.path.abspath('moose')
#### See if MOOSE_DIR is already in the environment instead
if os.environ.has_key("MOOSE_DIR"):
MOOSE_DIR = os.environ['MOOSE_DIR']
sys.path.append(os.path.join(MOOSE_DIR, 'python'))
import path_tool
path_tool.activate_module('TestHarness')
from TestHarness import TestHarness
# Run the tests!
TestHarness.buildAndRun(sys.argv, app_name, MOOSE_DIR)