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

Include total line information in summary.json for JVM #11966

Open
oliverchang opened this issue May 17, 2024 · 3 comments
Open

Include total line information in summary.json for JVM #11966

oliverchang opened this issue May 17, 2024 · 3 comments

Comments

@oliverchang
Copy link
Collaborator

oliverchang commented May 17, 2024

Context: google/oss-fuzz-gen#236

the summary.json for the coverage report of JVM projects lacks that information. And after some search, it seems that sumamry.json is generated from the oss-fuzz side in https://github.com/google/oss-fuzz/blob/master/infra/base-images/base-runner/coverage#L218-L227 with the script jacoco_report_converter.py. Thus if we need to make the summary.json have the needed information for getting the total lines, we will need to change the infer of oss-fuzz to accommodate that.

@oliverchang
Copy link
Collaborator Author

Any chance one of you could help fix this? @arthurscchan @DavidKorczynski ?

@arthurscchan
Copy link
Contributor

@oliverchang Yes, I will take a look of how to fix it later on.

DavidKorczynski pushed a commit that referenced this issue Jun 5, 2024
There are 2 bugs in the jacoco_report_converter.py in which the src_file
and src_path are redefined and overwritten in the loop. These bugs cause
both of them to empty after the first iteration. This makes the
resulting JSON report summary only contain the first filename to
process. This has been mentioned in #11966.
This PR proposes a fix by changing the name of the needed variables.
Also, this PR adds in a filter to exclude fuzzer classes in the coverage
information as they are not part of the projects. The updated script
will include the coverage information for each class that existed in the
project source directory (`/out/src`) in the summary tag of the
resulting summary.json report.

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan
Copy link
Contributor

This issue should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants