diff options
author | DavidKorczynski <david@adalogics.com> | 2022-06-30 06:06:42 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 18:06:42 +1000 |
commit | cf816c3244f022fc0eac0a32e3e344991cd802a8 (patch) | |
tree | 5f045b7acc6609f9e0738cdd544c3fbf10ef1499 | |
parent | a2eaeebecb37139041fcbb7a4e605567778634d5 (diff) |
infra: fix per-target coverage html generation (#7927)
* infra: fix per-target coverage html generation
When generating coverage reports for single targets we should not
include all fuzz targets (in the $objects var), but only the object
(binary file) for the given target.
Ref: https://github.com/ossf/fuzz-introspector/issues/340
* coverage: remove potential race condition
-rwxr-xr-x | infra/base-images/base-runner/coverage | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/infra/base-images/base-runner/coverage b/infra/base-images/base-runner/coverage index 400247bf..6b662dbf 100755 --- a/infra/base-images/base-runner/coverage +++ b/infra/base-images/base-runner/coverage @@ -107,8 +107,7 @@ function run_fuzz_target { fi # If necessary translate to latest profraw version. - profraw_update.py $OUT/$target $profraw_file_mask tmp.profraw - mv tmp.profraw $profraw_file_mask + profraw_update.py $OUT/$target $profraw_file_mask $profraw_file_mask llvm-profdata merge -j=1 -sparse $profraw_file_mask -o $profdata_file # Delete unnecessary and (potentially) large .profraw files. @@ -387,7 +386,7 @@ else fi report_dir=$REPORT_BY_TARGET_ROOT_DIR/$fuzz_target - generate_html $profdata_path "$shared_libraries" "$objects" "$report_dir" + generate_html $profdata_path "$shared_libraries" "$fuzz_target" "$report_dir" done fi |