rust-vmm / rust-vmm-ci

Apache License 2.0
18 stars 33 forks source link

test_coverage: calculate the difference in reverse #143

Closed stefano-garzarella closed 9 months ago

stefano-garzarella commented 9 months ago

Summary of the PR

If we increase the coverage the message prints a negative value as the difference from the previous value. This can be confusing as it looks like the coverage has decreased.

For example if the value in coverage_config_x86_64.json is 73.42, and the new coverage is 73.96 (increased), we have the following error:

ValueError: Current code coverage (73.96%) deviates by -0.54%
from the previous code co...

Let's calculate the difference in reverse so that we have a negative value if it decreases and positive otherwise.

Requirements

Before submitting your PR, please make sure you addressed the following requirements: