Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test coverage with multiprocessing fix #6073

Merged

Conversation

richtja
Copy link
Contributor

@richtja richtja commented Nov 26, 2024

The test coverage of avocado gathered by coverage.py. It was not precise, because some of our functional tests were running in sub-processes where the coverage was not enabled. This change it adds sitecustomize.py to ensure that coverage will be enabled for all python processes which will run during coverage testing. After this change, the overall test coverage of avocado will increase from 54% to 68%

Reference: https://coverage.readthedocs.io/en/latest/subprocess.html


As an example of not working, coverage testing can be #6072. Where the coverage of new runner is 0 even tho the PR introduce its testing.

@richtja richtja added the bug label Nov 26, 2024
@richtja richtja added this to the 109 - Codename TBD milestone Nov 26, 2024
@richtja richtja self-assigned this Nov 26, 2024
@richtja richtja force-pushed the coverage_multiprocessing_fix branch from 091f459 to ed6e56e Compare November 26, 2024 15:40
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.67%. Comparing base (f452aa5) to head (cee5223).
Report is 5 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6073       +/-   ##
===========================================
+ Coverage   54.47%   68.67%   +14.20%     
===========================================
  Files         202      202               
  Lines       21892    21892               
===========================================
+ Hits        11925    15034     +3109     
+ Misses       9967     6858     -3109     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@richtja richtja marked this pull request as draft November 27, 2024 10:39
@richtja richtja force-pushed the coverage_multiprocessing_fix branch from ed6e56e to d60eb45 Compare November 27, 2024 14:55
The test coverage of avocado gathered by coverage.py. It was not
precise, because some of our functional tests were running in
sub-processes where the coverage was not enabled. This change it adds
`sitecustomize.py` to ensure that coverage will be enabled for all
python processes which will run during coverage testing. After this
change, the overall test coverage of avocado will increase from 54%
to 68%

Reference: https://coverage.readthedocs.io/en/latest/subprocess.html
Signed-off-by: Jan Richter <[email protected]>
@richtja richtja force-pushed the coverage_multiprocessing_fix branch from d60eb45 to cee5223 Compare November 27, 2024 15:57
@richtja richtja marked this pull request as ready for review November 27, 2024 16:06
Copy link
Contributor

@clebergnu clebergnu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@clebergnu clebergnu merged commit 9bc4760 into avocado-framework:master Nov 28, 2024
58 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done 109
Development

Successfully merging this pull request may close these issues.

2 participants