8000 Update the test driver to share the reference data between the different compiler versions by Spacetown · Pull Request #556 · gcovr/gcovr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update the test driver to share the reference data between the different compiler versions #556

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

Conversation

Spacetown
Copy link
Member

This updates the test driver to search the reference data backwards for the different compiler versions and uses the first matching file. With this we can see the differences between the compiler versions and need less files to update if a format chenges.

@Spacetown Spacetown added QA related to testing, build infrastructure, etc Internal change Internal change not visible to user labels Jan 16, 2022
@Spacetown Spacetown added this to the 5.1 milestone Jan 16, 2022
@codecov
Copy link
codecov bot commented Jan 16, 2022

Codecov Report

Merging #556 (f4ec405) into master (8e0c377) will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #556      +/-   ##
==========================================
- Coverage   95.73%   95.68%   -0.05%     
==========================================
  Files          23       23              
  Lines        3213     3292      +79     
  Branches      603      609       +6     
==========================================
+ Hits         3076     3150      +74     
- Misses         66       69       +3     
- Partials       71       73       +2     
Flag Coverage Δ
ubuntu-18.04 94.74% <ø> (-0.09%) ⬇️
windows-2019 95.33% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gcovr/tests/test_args.py 98.84% <0.00%> (-1.16%) ⬇️
gcovr/gcov.py 82.12% <0.00%> (-0.50%) ⬇️
gcovr/tests/test_gcovr.py 97.53% <0.00%> (-0.47%) ⬇️
gcovr/utils.py 91.15% <0.00%> (-0.31%) ⬇️
gcovr/gcov_parser.py 100.00% <0.00%> (ø)
gcovr/writer/html.py 95.90% <0.00%> (ø)
gcovr/writer/json.py 96.66% <0.00%> (ø)
gcovr/tests/test_gcov_parser.py 100.00% <0.00%> (ø)
gcovr/decision_analysis.py 95.45% <0.00%> (+0.06%) ⬆️
gcovr/__main__.py 91.81% <0.00%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e0c377...f4ec405. Read the comment docs.

Copy link
Member
@latk latk left a comment

Choose a reason for hiding this comment

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

This is a brilliant change that will make subsequent code reviews much easier! Thank you!

Aside from the inline comments – do you think it would be possible to add a small test that ensures that there are no duplicate reference files? I'm worried that one run with --generate_references would restore the redundant files.

@Spacetown
Copy link
Member Author

Aside from the inline comments – do you think it would be possible to add a small test that ensures that there are no duplicate reference files? I'm worried that one run with --generate_references would restore the redundant files.

I'll add a function for cleanup the duplicate data after the test if the data was generated or updated. I've used this code temporary for removing the duplicates.

@Spacetown Spacetown force-pushed the reuse_reference_data_for_different_compiler_versions branch 3 times, most recently from 3e96d77 to 8da7536 Compare January 17, 2022 21:00
@Spacetown Spacetown force-pushed the reuse_reference_data_for_different_compiler_versions branch from 10794ea to 31f7e5b Compare January 22, 2022 21:07
With other compiler versions the data is changed.
@Spacetown Spacetown force-pushed the reuse_reference_data_for_different_compiler_versions branch from 31f7e5b to 7b1073b Compare January 22, 2022 21:25
@Spacetown Spacetown requested a review from latk January 25, 2022 19:28
@Spacetown
Copy link
Member Author

@latk Can we merge this PR before #561? Than I can use this to create the reference data for the other compilers.

Copy link
Member
@latk latk left a comment

Choose a reason for hiding this comment

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

I think this code is fine for Unix/Linux, but I'm not sure if the handling of the Windows directories is done correctly in all cases. Could you take a look?

@Spacetown Spacetown force-pushed the reuse_reference_data_for_different_compiler_versions branch from d95fd5c to ca3e264 Compare January 26, 2022 20:51
@Spacetown Spacetown force-pushed the reuse_reference_data_for_different_compiler_versions branch from ca3e264 to 00546b5 Compare January 26, 2022 20:56
@Spacetown Spacetown merged commit 7576544 into gcovr:master Feb 20, 2022
@Spacetown Spacetown deleted the reuse_reference_data_for_different_compiler_versions branch February 20, 2022 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal change Internal change not visible to user QA related to testing, build infrastructure, etc
Projects
None yet
Development
394A

Successfully merging this pull request may close these issues.

2 participants
0