Skip to content

Commit 9c3939b

Browse files
committed
run-tests.sh should use arrays for arguments
1 parent 9694239 commit 9c3939b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.evergreen/run-tests.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,18 +265,15 @@ PIP_QUIET=0 uv run ${UV_ARGS[*]} --with pip pip list
265265
if [ -z "$GREEN_FRAMEWORK" ]; then
266266
# Use --capture=tee-sys so pytest prints test output inline:
267267
# https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html
268-
PYTEST_ARGS="-v --capture=tee-sys --durations=5 $TEST_ARGS"
268+
PYTEST_ARGS=("-v" "--capture=tee-sys" "--durations=5" "$TEST_ARGS")
269269
if [ -n "$TEST_SUITES" ]; then
270270
# Workaround until unittest -> pytest conversion is complete
271271
if [[ "$TEST_SUITES" == *"default_async"* ]]; then
272-
# shellcheck disable=SC2206
273-
ASYNC_PYTEST_ARGS=("-m asyncio" "--junitxml=xunit-results/TEST-asyncresults.xml" $PYTEST_ARGS)
272+
ASYNC_PYTEST_ARGS=("-m asyncio" "--junitxml=xunit-results/TEST-asyncresults.xml" "${PYTEST_ARGS[@]}")
274273
else
275-
# shellcheck disable=SC2206
276-
ASYNC_PYTEST_ARGS=("-m asyncio and $TEST_SUITES" "--junitxml=xunit-results/TEST-asyncresults.xml" $PYTEST_ARGS)
274+
ASYNC_PYTEST_ARGS=("-m asyncio and $TEST_SUITES" "--junitxml=xunit-results/TEST-asyncresults.xml" "${PYTEST_ARGS[@]}")
277275
fi
278-
# shellcheck disable=SC2206
279-
PYTEST_ARGS=("-m $TEST_SUITES and not asyncio" $PYTEST_ARGS)
276+
PYTEST_ARGS=("-m $TEST_SUITES and not asyncio" "${PYTEST_ARGS[@]}")
280277
fi
281278
# shellcheck disable=SC2048
282279
uv run ${UV_ARGS[*]} pytest "${PYTEST_ARGS[@]}"

0 commit comments

Comments
 (0)