Skip to content

Commit

Permalink
Merge pull request #1965 from joshua-cogliati-inl/fix_run_tests
Browse files Browse the repository at this point in the history
Fix run tests
  • Loading branch information
mandd authored Sep 15, 2022
2 parents a733699 + 3a31b76 commit 6ccc556
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
14 changes: 10 additions & 4 deletions run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ then
source $SCRIPT_DIR/scripts/establish_conda_env.sh --load --installation-manager PIP
else
echo No installation: $INSTALLATION_MANAGER
if [ -z $PYTHON_COMMAND ];
then
# check the RC file
PYTHON_COMMAND=$(read_ravenrc "PYTHON_COMMAND")
fi
fi

# pick tests to run
Expand Down Expand Up @@ -79,8 +84,9 @@ for A in "$@"; do
esac
done

#Note that this is from the perspective of python
FRAMEWORK_DIR=`$PYTHON_COMMAND $SCRIPT_DIR/scripts/plugin_handler.py -z`
#Note that this is from the perspective of python, otherwise would be
# identical to $SCRIPT_DIR (which matters on windows, but not elsewhere)
RAVEN_DIR=`$PYTHON_COMMAND $SCRIPT_DIR/scripts/plugin_handler.py -r`


# run the tests
Expand Down Expand Up @@ -123,7 +129,7 @@ if [[ $DO_RAVEN == 0 ]]; then
echo
echo Running $P tests ...
# get location of ExamplePlugin test dir
ROOK_COMMAND="$PYTHON_COMMAND $SCRIPT_DIR/rook/main.py --test-dir $LOCATION --testers-dir $FRAMEWORK_DIR/../scripts/TestHarness/testers,$LOCATION/../src/Testers --add-non-default-run-types qsub ${ARGS[@]}"
ROOK_COMMAND="$PYTHON_COMMAND $SCRIPT_DIR/rook/main.py --test-dir $LOCATION --testers-dir $RAVEN_DIR/scripts/TestHarness/testers,$LOCATION/../src/Testers --add-non-default-run-types qsub ${ARGS[@]}"
# $PYTHON_COMMAND $SCRIPT_DIR/rook/main.py --test-dir $LOCATION --add-non-default-run-types qsub "${ARGS[@]}"
$ROOK_COMMAND
rc=$?
Expand Down Expand Up @@ -151,7 +157,7 @@ if [[ $DO_PLUGINS == 0 ]]; then
echo
echo Starting tests for plugin "$P" ...
# add RAVEN testers to plugin testers
ROOK_COMMAND="$PYTHON_COMMAND $SCRIPT_DIR/rook/main.py --test-dir $LOCATION --testers-dir $FRAMEWORK_DIR/../scripts/TestHarness/testers,$LOCATION/../src/Testers --add-non-default-run-types qsub ${ARGS[@]}"
ROOK_COMMAND="$PYTHON_COMMAND $SCRIPT_DIR/rook/main.py --test-dir $LOCATION --testers-dir $RAVEN_DIR/scripts/TestHarness/testers,$LOCATION/../src/Testers --add-non-default-run-types qsub ${ARGS[@]}"
echo Running ROOK command: "$ROOK_COMMAND" ...
{
# try
Expand Down
5 changes: 5 additions & 0 deletions scripts/plugin_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ def getPluginLocation(name):
help='lists installed plugins')
parser.add_argument('-z', '--framework-dir', dest='framework_dir',
action='store_true', help='prints framework directory')
parser.add_argument('-r', '--raven-dir', dest='raven_dir',
action='store_true', help='prints raven directory')


# no arguments? get some help!
if len(sys.argv) == 1:
Expand All @@ -200,6 +203,8 @@ def getPluginLocation(name):
args = parser.parse_args()
if args.framework_dir:
print(os.path.abspath(frameworkDir))
if args.raven_dir:
print(os.path.dirname(os.path.abspath(frameworkDir)))
# plugins list
doList = args.list
if doList:
Expand Down

0 comments on commit 6ccc556

Please sign in to comment.