Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions oss-fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ function coverbuild {
path=$1
function=$2
fuzzer=$3
tags=""
coverage_package=$coverpkg

if [[ $# -eq 4 ]]; then
tags="-tags $4"
coverage_package=$4
fi
cd $path
fuzzed_package=`pwd | rev | cut -d'/' -f 1 | rev`
Expand All @@ -38,7 +38,7 @@ cat << DOG > $OUT/$fuzzer
#/bin/sh

cd $OUT/$path
go test -run Test${function}Corpus -v $tags -coverprofile \$1 -coverpkg $coverpkg
go test -run Test${function}Corpus -v -coverprofile \$1 -coverpkg $coverage_package

DOG

Expand All @@ -64,7 +64,7 @@ function compile_fuzzer() {
go get github.com/holiman/gofuzz-shim/testing

if [[ $SANITIZER == *coverage* ]]; then
coverbuild $path $function $fuzzer $coverpkg
coverbuild $path $function $fuzzer
else
gofuzz-shim --func $function --package $package -f $file -o $fuzzer.a
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -o $OUT/$fuzzer
Expand Down
Loading