mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-09 08:58:27 +03:00
setup: Skip coverage report when tests are aborted or skipped
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
e784376699
commit
49d16912c3
9
setup.py
9
setup.py
@ -503,8 +503,15 @@ class TestBaseCommand(distutils.core.Command):
|
||||
|
||||
err = int(bool(len(result.failures) > 0 or
|
||||
len(result.errors) > 0))
|
||||
if getattr(result, "shouldStop", False):
|
||||
# Test was aborted with ctrl-c
|
||||
err = True
|
||||
|
||||
if cov and not err:
|
||||
cov.report(show_missing=False, skip_covered=True)
|
||||
if len(result.skipped):
|
||||
print("Skipping coverage report because tests were skipped.")
|
||||
else:
|
||||
cov.report(show_missing=False, skip_covered=True)
|
||||
sys.exit(err)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user