Skip to content

Commit

Permalink
Fixed multi-word arguments bug in run_tests (#2340)
Browse files Browse the repository at this point in the history
* Fixed multi-word arg bug
  • Loading branch information
caleb-sitton-inl authored Jul 17, 2024
1 parent 2633b64 commit 469e9a2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ 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 $RAVEN_DIR/scripts/TestHarness/testers,$LOCATION/../src/Testers --add-non-default-run-types qsub ${ARGS[@]}"
EXTRA="--test-dir $LOCATION --testers-dir $RAVEN_DIR/scripts/TestHarness/testers,$LOCATION/../src/Testers --add-non-default-run-types qsub"
$PYTHON_COMMAND $SCRIPT_DIR/rook/main.py $EXTRA "${ARGS[@]}"
# $PYTHON_COMMAND $SCRIPT_DIR/rook/main.py --test-dir $LOCATION --add-non-default-run-types qsub "${ARGS[@]}"
$ROOK_COMMAND
rc=$?
ALL_PASS=$(($ALL_PASS + $rc))
if [[ $rc != 0 ]]; then
Expand All @@ -171,11 +171,13 @@ 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 $RAVEN_DIR/scripts/TestHarness/testers,$LOCATION/../src/Testers --add-non-default-run-types qsub ${ARGS[@]}"
echo Running ROOK command: "$ROOK_COMMAND" ...
EXTRA="--test-dir $LOCATION --testers-dir $RAVEN_DIR/scripts/TestHarness/testers,$LOCATION/../src/Testers --add-non-default-run-types qsub"
echo Running ROOK command: "$PYTHON_COMMAND $SCRIPT_DIR/rook/main.py $EXTRA ${ARGS[@]} ..."
{
# try
$ROOK_COMMAND
# this is copy/paste from line 175
# saving this entire command in a string variable causes problems when there are multi-word args using quotes (--arg="con tent") in ARGS
$PYTHON_COMMAND $SCRIPT_DIR/rook/main.py $EXTRA "${ARGS[@]}"
rc=$?
} || {
# catch
Expand Down

0 comments on commit 469e9a2

Please sign in to comment.