@@ -31,7 +31,7 @@ set -o xtrace
31
31
AUTH=${AUTH:- noauth}
32
32
SSL=${SSL:- nossl}
33
33
TEST_SUITES=${TEST_SUITES:- }
34
- TEST_ARGS=" ${*: 1} "
34
+ TEST_ARGS=( " ${*: 1} " )
35
35
36
36
export PIP_QUIET=1 # Quiet by default
37
37
export PIP_PREFER_BINARY=1 # Prefer binary dists by default
@@ -206,6 +206,7 @@ if [ -n "$TEST_INDEX_MANAGEMENT" ]; then
206
206
TEST_SUITES=" index_management"
207
207
fi
208
208
209
+ # shellcheck disable=SC2128
209
210
if [ -n " $TEST_DATA_LAKE " ] && [ -z " $TEST_ARGS " ]; then
210
211
TEST_SUITES=" data_lake"
211
212
fi
@@ -235,7 +236,7 @@ if [ -n "$PERF_TEST" ]; then
235
236
TEST_SUITES=" perf"
236
237
# PYTHON-4769 Run perf_test.py directly otherwise pytest's test collection negatively
237
238
# affects the benchmark results.
238
- TEST_ARGS= " test/performance/perf_test.py $TEST_ARGS "
239
+ TEST_ARGS+=( " test/performance/perf_test.py" )
239
240
fi
240
241
241
242
echo " Running $AUTH tests over $SSL with python $( uv python find) "
@@ -251,7 +252,7 @@ if [ -n "$COVERAGE" ] && [ "$PYTHON_IMPL" = "CPython" ]; then
251
252
# Keep in sync with combine-coverage.sh.
252
253
# coverage >=5 is needed for relative_files=true.
253
254
UV_ARGS+=(" --group coverage" )
254
- TEST_ARGS= " $TEST_ARGS --cov"
255
+ TEST_ARGS+=( " --cov" )
255
256
fi
256
257
257
258
if [ -n " $GREEN_FRAMEWORK " ]; then
@@ -265,7 +266,7 @@ PIP_QUIET=0 uv run ${UV_ARGS[*]} --with pip pip list
265
266
if [ -z " $GREEN_FRAMEWORK " ]; then
266
267
# Use --capture=tee-sys so pytest prints test output inline:
267
268
# https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html
268
- PYTEST_ARGS=(" -v" " --capture=tee-sys" " --durations=5" " $TEST_ARGS " )
269
+ PYTEST_ARGS=(" -v" " --capture=tee-sys" " --durations=5" " ${ TEST_ARGS[@]} " )
269
270
if [ -n " $TEST_SUITES " ]; then
270
271
# Workaround until unittest -> pytest conversion is complete
271
272
if [[ " $TEST_SUITES " == * " default_async" * ]]; then
@@ -293,7 +294,7 @@ if [ -z "$GREEN_FRAMEWORK" ]; then
293
294
fi
294
295
else
295
296
# shellcheck disable=SC2048
296
- uv run ${UV_ARGS[*]} green_framework_test.py $GREEN_FRAMEWORK -v $ TEST_ARGS
297
+ uv run ${UV_ARGS[*]} green_framework_test.py $GREEN_FRAMEWORK -v " ${ TEST_ARGS[@]} "
297
298
fi
298
299
299
300
# Handle perf test post actions.
0 commit comments