Skip to content

repo: Patch coverage with subprocess#840

Merged
carlescufi merged 1 commit into
zephyrproject-rtos:mainfrom
pdgendt:codecov-subprocess
Sep 18, 2025
Merged

repo: Patch coverage with subprocess#840
carlescufi merged 1 commit into
zephyrproject-rtos:mainfrom
pdgendt:codecov-subprocess

Conversation

@pdgendt
Copy link
Copy Markdown
Collaborator

@pdgendt pdgendt commented Sep 18, 2025

Coverage subprocess has been removed in pytest-cov 7.0. To migrate the patch option has to be added.
See https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html

@marc-hb the coverage plummeted to 48% for no apparent reason because, in CI, we simply install the latest versions of all tools.
As it took quite some time to figure this out, I intend to come back to locking dependency versions in CI. But with a better proposal, stay tuned.

Coverage subprocess has been removed in pytest-cov 7.0. To migrate the
`patch` option has to be added.
See https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.43%. Comparing base (1ffe41c) to head (0444d56).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main     #840       +/-   ##
===========================================
+ Coverage   47.86%   84.43%   +36.57%     
===========================================
  Files          11       11               
  Lines        3366     3366               
===========================================
+ Hits         1611     2842     +1231     
+ Misses       1755      524     -1231     

see 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@carlescufi carlescufi merged commit 8901798 into zephyrproject-rtos:main Sep 18, 2025
23 checks passed
@pdgendt pdgendt deleted the codecov-subprocess branch September 18, 2025 09:51
@marc-hb
Copy link
Copy Markdown
Collaborator

marc-hb commented Sep 18, 2025

As it took quite some time to figure this out, I intend to come back to locking dependency versions in CI. But with a better proposal, stay tuned.

I lost track of the previous discussion sorry (assuming I ever was on top of it...EDIT: #802?) but why can't this simply be solved with TWO requirements.txt files? A "very hardcoded" one used by CI and releases (and anyone else who wants it) and more "relaxed", flexible and "traditional" one with just minimum versions? The latter can be used by developers to avoid virtualenv and to spot regressions like you just did. I did exactly that (2 requirements-*.txt files) once for a tricky sphinx build and it worked really well.

As it took quite some time to figure this out,...

If that's any consolation, someone would have had to spend this time eventually anyway and it most likely would have still been you :-/ However I agree it would be better to be in control of the timing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants