-
Notifications
You must be signed in to change notification settings - Fork 13
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
CP-48198: Fix running pytest on tests/integration in GitHub CI (with coverage) #105
Merged
bernhardkaindl
merged 3 commits into
xenserver:master
from
xenserver-next:CP-48198/cover-integration-tests-cwd-independent
Apr 4, 2024
Merged
CP-48198: Fix running pytest on tests/integration in GitHub CI (with coverage) #105
bernhardkaindl
merged 3 commits into
xenserver:master
from
xenserver-next:CP-48198/cover-integration-tests-cwd-independent
Apr 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #105 +/- ##
======================================
+ Coverage 88% 91% +3%
======================================
Files 18 19 +1
Lines 2196 2242 +46
======================================
+ Hits 1939 2058 +119
+ Misses 257 184 -73
... and 2 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. |
225d58d
to
e63ac32
Compare
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
e63ac32
to
117d1d7
Compare
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
92e0db9
to
ce8002f
Compare
Pull Request Test Coverage Report for Build 8477989884Details
💛 - Coveralls |
ashwin9390
approved these changes
Apr 4, 2024
GeraldEV
approved these changes
Apr 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Improvement for test code coverage collection
improvements / enhancements for the tests
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes a number of fixes / improvements for the tests:
Improve tests so that tests/integration/*.py can contribute to covering xen-bugtool
.github/workflows/main.yml
:tests/integration
in GitHub CI which use/opt/hostedtoolcache
to provide Python.tests/integration
needs to use/opt/xensource
as mount point for the dom0 template files in/opt/xensource
.tests/integration/utils.py
: Userunpy.run_path(bugtool_script, run_name="__main__")
to get coverage if the scripttests/integration/conftest.py
: Add mocks tosys.path
so the mocks are found duringrunpy.run_path()
.coveragerc
: Update to no longer limit coverage totests/unit
but also includetests/integration
.Support running tests independent of the starting directory
os.getcwd()
was used to get relative paths to be based on__file__
.Other changes
tests/unit/test_main.py
: Fix test to pass with Python 3.11