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

Improve tests, code coverage, and Makefile targets #131

Merged
merged 3 commits into from
May 13, 2023

Conversation

snprajwal
Copy link
Member

  • The CRIT E2E test did not cover the crit info and crit show commands. The test has been extended to include these.
  • The code coverage for autogenerated files is not required to be reported. The Makefile target has been modified to skip these files before uploading the coverage report.
  • Due to enclosing the test command in a block, shell would return exit code 0 even if the command running the test failed. This has been fixed using a trap to perform the cleanup instead.

PTAL @adrianreber @rst0git

The E2E test was previously testing encode, decode and explore commands.
It now also tests the show and info commands on `inventory.img`.

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
Generated files like protobuf bindings are not required to be checked
for test coverage. This commit removes the coverage statistics for these
files from `coverage.out` after merging coverage results.

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
The Make targets in `test` would not fail upon errors due the block
scope of the shell command. This issue has been fixed with a trap to
kill the test process upon failure.

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Patch coverage has no change and project coverage change: +26.10 🎉

Comparison is base (f5768e5) 22.74% compared to head (3843e79) 48.84%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #131       +/-   ##
===========================================
+ Coverage   22.74%   48.84%   +26.10%     
===========================================
  Files          95       22       -73     
  Lines       15292     2381    -12911     
===========================================
- Hits         3478     1163     -2315     
+ Misses      11514     1059    -10455     
+ Partials      300      159      -141     

see 77 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@adrianreber adrianreber left a comment

Choose a reason for hiding this comment

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

Looks good

test/Makefile Outdated Show resolved Hide resolved
Copy link
Member

@rst0git rst0git left a comment

Choose a reason for hiding this comment

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

LGTM

@rst0git rst0git merged commit 45baa8a into checkpoint-restore:master May 13, 2023
@snprajwal snprajwal deleted the fix-tests branch June 4, 2023 10:19
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.

None yet

3 participants