From 77941068561f92a8ede41de8454f7345e59a9901 Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Tue, 17 May 2022 02:51:54 +0100 Subject: [PATCH] infra: fix python coverage (#7711) The current implementation will append rather than overwrite coverage_wrapper.py which holds the coverage stub. The effect of the appending is that the coverage_wrapper.py will include X amount of coverage stubs when a project has X amount of fuzzers. We just need a single coverage stub at the top of each fuzzer. This ensure we only add a single coverage stub. --- infra/base-images/base-builder/compile_python_fuzzer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/base-images/base-builder/compile_python_fuzzer b/infra/base-images/base-builder/compile_python_fuzzer index bda04e545..afe8695b7 100755 --- a/infra/base-images/base-builder/compile_python_fuzzer +++ b/infra/base-images/base-builder/compile_python_fuzzer @@ -26,7 +26,7 @@ FUZZ_WORKPATH=$PYFUZZ_WORKPATH/$fuzzer_basename # In coverage mode prepend coverage logic to the fuzzer source if [[ $SANITIZER = *coverage* ]]; then - cat <> coverage_wrapper.py + cat < coverage_wrapper.py ###### Coverage stub import atexit import coverage