Skip to content

Commit e7f4757

Browse files
committed
PYTHON-5181 Make it easier to set debugging logging in an Evergreen patch
1 parent f1fe497 commit e7f4757

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.evergreen/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ fi
3333
PIP_QUIET=0 uv run ${UV_ARGS} --with pip pip list
3434

3535
# Start the test runner.
36-
uv run ${UV_ARGS} .evergreen/scripts/run_tests.py
36+
uv run ${UV_ARGS} .evergreen/scripts/run_tests.py "$@"
3737

3838
popd

.evergreen/scripts/run_tests.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import json
4+
import logging
45
import os
56
import platform
67
import shutil
@@ -106,8 +107,11 @@ def run() -> None:
106107
test_kms_remote(SUB_TEST_NAME)
107108
return
108109

110+
if os.environ.get("DEBUG_LOG"):
111+
TEST_ARGS.extend(f"-o log_cli_level={logging.DEBUG} -o log_cli=1".split())
112+
109113
# Run local tests.
110-
pytest.main(TEST_ARGS)
114+
pytest.main(TEST_ARGS + sys.argv[1:])
111115

112116
# Handle perf test post actions.
113117
if TEST_PERF:

0 commit comments

Comments
 (0)