-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Collect test names in lcov reports #84106
Conversation
Ran twister on 6448 test cases With
Without
So not a lot faster, but some. |
fd2daac
to
7aeff42
Compare
@jeremybettis, nice to see you are also going in the same direction as in #66345 (RFC #67058) From my understanding, this PR's
well, when I try it looks opposite for me (~10% slower), e.g.:
|
this is nice, didn't know lcov can do that. |
I'm resolving the merge conflicts, don't look at this PR. |
686759b
to
8585f4c
Compare
Ok, I've rebased, and I went ahead and split up my change into 4 commits, and they are all very small. |
There is no flag named --coverage-split, switch help to --coverage-per-instance Signed-off-by: Jeremy Bettis <jbettis@google.com>
Instead of capturing the coverage data twice with --coverage-per-instance, just merge the lcov files in the aggregation report. Signed-off-by: Jeremy Bettis <jbettis@google.com>
When using --coverage-per-instance, collect the test names in lcov, and add --show-details to the html report to display those test names. Signed-off-by: Jeremy Bettis <jbettis@google.com>
Don't ignore lcov exit codes, but instead log and return if one of the lcov commands fails. Signed-off-by: Jeremy Bettis <jbettis@google.com>
8585f4c
to
565fb1c
Compare
"-output-directory", os.path.join(outdir, "coverage")] + files | ||
"-output-directory", os.path.join(outdir, "coverage")] | ||
if self.coverage_per_instance: | ||
cmd.append("--show-details") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps genhtml also needs --description-file
generated with a summary for test names and descriptions to show it in the report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the tests have descriptions?
If the flag
--coverage-by-instance
is passed to twister, pass the test name to lcov so that the coverage reports will include test details.Here is an example without the test names populated:
![42AEQv8ZynYtoK7](https://private-user-images.githubusercontent.com/47797246/403959804-59219e84-c8dd-4535-b136-089026dab7af.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMTE2NjQsIm5iZiI6MTczOTIxMTM2NCwicGF0aCI6Ii80Nzc5NzI0Ni80MDM5NTk4MDQtNTkyMTllODQtYzhkZC00NTM1LWIxMzYtMDg5MDI2ZGFiN2FmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDE4MTYwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE5MTVhNzViNWI1ZjZjOWMyZmEyMzY5ODQ5MjFkZTczYjBkMTg4N2FhNjk0MDQ5OWI0YzIwNDFmZWVlOTNkMzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.I8IZNc_EifA0hVOZymYT0AEUKEFySS-Nu0ykne2tYUc)
And with:
![w4t2fuyT64kWDRy](https://private-user-images.githubusercontent.com/47797246/403960172-973e6f8b-9b3b-4506-9844-a77f47d4fa93.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMTE2NjQsIm5iZiI6MTczOTIxMTM2NCwicGF0aCI6Ii80Nzc5NzI0Ni80MDM5NjAxNzItOTczZTZmOGItOWIzYi00NTA2LTk4NDQtYTc3ZjQ3ZDRmYTkzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQ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