Skip to content

Commit a7e172f

Browse files
committed
feat: enable parallel pytest coverage
The signal handler tests do not count towards coverage because they are tested in a separate process (to avoid signals being intercepted by `pytest` instead). We can still capture this coverage however by configuring pytest-coverage to know that we may be executing tests with multiple processes by using `multiprocessing`. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
1 parent 6bbb49d commit a7e172f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ ignore = [
135135
addopts = "--cov=dvsim --cov-report term-missing"
136136
norecursedirs = ["*.egg", ".*", "_darcs", "build", "dist", "venv", "scratch", "doc"]
137137

138+
[tool.coverage.run]
139+
parallel = true
140+
concurrency = ["multiprocessing"]
141+
142+
[tool.coverage.report]
143+
show_missing = true
144+
138145
[tool.semantic_release]
139146
commit_parser = "conventional"
140147
version_toml = ["pyproject.toml:project.version"]

0 commit comments

Comments
 (0)