Skip to content

Commit 5fbc9a9

Browse files
committed
fix(toolchain) Override coverage rc
1 parent 2f46873 commit 5fbc9a9

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

docs/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ colorama==0.4.6 ; sys_platform == 'win32' \
118118
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
119119
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
120120
# via sphinx
121-
docutils==0.20.1 \
122-
--hash=sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6 \
123-
--hash=sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b
121+
docutils==0.21.2 \
122+
--hash=sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f \
123+
--hash=sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2
124124
# via
125125
# myst-parser
126126
# sphinx

python/private/stage2_bootstrap_template.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -350,29 +350,28 @@ def _maybe_collect_coverage(enable):
350350
rcfile.write(
351351
"""[run]
352352
relative_files = True
353+
omit =
354+
# Pipes can't be read back later, which can cause coverage to
355+
# throw an error when trying to get its source code.
356+
/dev/fd/*
357+
# The mechanism for finding third-party packages in coverage-py
358+
# only works for installed packages, not for runfiles. e.g:
359+
#'$HOME/.local/lib/python3.10/site-packages',
360+
# '/usr/lib/python',
361+
# '/usr/lib/python3.10/site-packages',
362+
# '/usr/local/lib/python3.10/dist-packages'
363+
# see https://github.com/nedbat/coveragepy/blob/bfb0c708fdd8182b2a9f0fc403596693ef65e475/coverage/inorout.py#L153-L164
364+
*/external/*
353365
"""
354366
)
355367
try:
356368
cov = coverage.Coverage(
357-
config_file=rcfile_name,
369+
config_file=os.environ.get("COVERAGE_RCFILE", rcfile_name),
358370
branch=True,
359371
# NOTE: The messages arg controls what coverage prints to stdout/stderr,
360372
# which can interfere with the Bazel coverage command. Enabling message
361373
# output is only useful for debugging coverage support.
362374
messages=is_verbose_coverage(),
363-
omit=[
364-
# Pipes can't be read back later, which can cause coverage to
365-
# throw an error when trying to get its source code.
366-
"/dev/fd/*",
367-
# The mechanism for finding third-party packages in coverage-py
368-
# only works for installed packages, not for runfiles. e.g:
369-
#'$HOME/.local/lib/python3.10/site-packages',
370-
# '/usr/lib/python',
371-
# '/usr/lib/python3.10/site-packages',
372-
# '/usr/local/lib/python3.10/dist-packages'
373-
# see https://github.com/nedbat/coveragepy/blob/bfb0c708fdd8182b2a9f0fc403596693ef65e475/coverage/inorout.py#L153-L164
374-
"*/external/*",
375-
],
376375
)
377376
cov.start()
378377
try:

0 commit comments

Comments
 (0)