Skip to content

Commit

Permalink
imageio: fix coverage build (google#9443)
Browse files Browse the repository at this point in the history
In order for code coverage to work we need to use
`compile_python_fuzzer` when building the fuzzers

Fixes: google#9442
  • Loading branch information
DavidKorczynski authored and eamonnmcmanus committed Mar 15, 2023
1 parent 5ac7910 commit 4a1e522
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions projects/imageio/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,5 @@ python3 setup.py build install

# Build fuzzers in $OUT.
for fuzzer in $(find . -name 'fuzz_*.py'); do
fuzzer_basename=$(basename -s .py $fuzzer)
fuzzer_package=${fuzzer_basename}.pkg
pyinstaller --distpath $OUT --onefile --name $fuzzer_package $fuzzer

# Create execution wrapper.
echo "#!/bin/sh
# LLVMFuzzerTestOneInput for fuzzer detection.
this_dir=\$(dirname \"\$0\")
ASAN_OPTIONS=\$ASAN_OPTIONS:symbolize=1:external_symbolizer_path=\$this_dir/llvm-symbolizer:detect_leaks=0 \
\$this_dir/$fuzzer_package \$@" > $OUT/$fuzzer_basename
chmod +x $OUT/$fuzzer_basename
compile_python_fuzzer $fuzzer
done

0 comments on commit 4a1e522

Please sign in to comment.