fix(coverage): pass script path directly to slipcover instead of via python subprocess
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 27s
CI / typecheck (pull_request) Successful in 57s
CI / quality (pull_request) Successful in 40s
CI / security (pull_request) Successful in 1m37s
CI / build (pull_request) Successful in 26s
CI / helm (pull_request) Successful in 35s
CI / push-validation (pull_request) Successful in 23s
CI / e2e_tests (pull_request) Successful in 3m39s
CI / integration_tests (pull_request) Successful in 5m2s
CI / unit_tests (pull_request) Successful in 5m58s
CI / docker (pull_request) Successful in 29s
CI / coverage (pull_request) Successful in 15m57s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 57m21s

The coverage_report nox session was passing 'python scripts/run_behave_parallel.py'
as the command to slipcover's '--' separator. This caused slipcover to spawn an
uninstrumented Python subprocess, preventing coverage data from being collected.

Fix: pass the script path directly (without 'python' prefix) so slipcover runs
the script in-process and can instrument it correctly. This matches the behavior
of the old console-script entry point approach.

Closes #8168
This commit is contained in:
2026-04-14 10:29:14 +00:00
parent 0f19835a90
commit d6b46df34f
+4 -2
View File
@@ -508,10 +508,13 @@ def coverage_report(session: nox.Session):
path.unlink()
# Build behave runner args (sequential for coverage).
# Pass the script path directly (not via "python script.py") so that
# slipcover can instrument the script in-process rather than spawning
# an uninstrumented Python subprocess. Slipcover's "--" separator
# accepts a Python script path and runs it in the same interpreter.
behave_runner = str(BEHAVE_PARALLEL_SCRIPT)
if session.posargs and session.posargs[0].endswith(".feature"):
behave_args = [
"python",
behave_runner,
"-q",
"--no-capture",
@@ -519,7 +522,6 @@ def coverage_report(session: nox.Session):
]
else:
behave_args = [
"python",
behave_runner,
"-q",
"--no-capture",