forked from shortlab/mamba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests
executable file
·27 lines (21 loc) · 1.06 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])))
#### Set the name of the application here and moose directory relative to the application
app_name = 'mamba-dev'
MOOSE_DIR = os.path.abspath(os.path.join('..', 'moose'))
FRAMEWORK_DIR = os.path.abspath(os.path.join('..', 'moose', 'framework'))
#### See if MOOSE_DIR is already in the environment instead
if os.environ.has_key("MOOSE_DIR"):
MOOSE_DIR = os.environ['MOOSE_DIR']
FRAMEWORK_DIR = os.path.join(MOOSE_DIR, 'framework')
if os.environ.has_key("FRAMEWORK_DIR"):
FRAMEWORK_DIR = os.environ['FRAMEWORK_DIR']
# Import the TestHarness and Helper functions from the MOOSE toolkit
sys.path.append(os.path.join(FRAMEWORK_DIR, 'scripts', 'common'))
sys.path.append(os.path.join(FRAMEWORK_DIR, 'scripts', 'TestHarness'))
import tools
# create an instance of the test harness passing in the main arg vector
# and the name of the application
tools.runTests(sys.argv, app_name, FRAMEWORK_DIR)