Commit Graph

4 Commits

Author SHA1 Message Date
Arthur Chan 0406dd5676
[infra] Fix jacoco_report_converter.py (#12026)
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>
2024-06-05 11:47:18 +01:00
jonathanmetzman 18a5b07b6b
[java][coverage] Make sure filenames is a string and not a list. (#6928)
* single quotes

* [java][coverage] Make sure filenames is a string and not a list.

Fixes: https://github.com/google/oss-fuzz/issues/6913

* fmt
2021-11-30 08:10:08 -05:00
Fabian Meumertzheim 6defe8c725
[infra] File-level coverage for JVM projects (#5822)
* Exclude Jazzer classes from coverage reports

* Generate file-level coverage data for Java

Adds per-file coverage information to llvm-cov style *.json files for
Java targets.

This provides full CI Fuzz support for "jvm" projects.
2021-05-25 08:05:16 -07:00
Fabian Meumertzheim 5cfb074ae5
Add Java coverage support (#5733)
Coverage is collected by running the fuzz targets with the JaCoCo agent
in Jazzer's no instrumentation mode.

Since JaCoCo does not support llvm-cov style coverage reports, a simple
Python helper creates it using the information contained in the JaCoCo
XML report.

As the Java build process does not maintain a mapping between source
files and build artifacts and JaCoCo needs to be passed the root folder
of the package tree, we use the Maven directory layout convention to
heuristically detect these roots.
2021-05-10 20:33:07 -07:00