mirror of https://github.com/google/oss-fuzz.git
compile_go_fuzzer: pass build tags to `go list` (#5008)
`go list` will fail if all files in the fuzzed package use a build tag restriction (like the common `gofuzz` tag). Also, pass the `gofuzz` tag in the teleport build to plumb it through.
This commit is contained in:
parent
9797a3447d
commit
687187f07e
|
@ -25,7 +25,7 @@ fi
|
|||
|
||||
if [[ $SANITIZER = *coverage* ]]; then
|
||||
cd $GOPATH/src/$path
|
||||
fuzzed_package=`go list -f '{{.Name}}'`
|
||||
fuzzed_package=`go list $tags -f '{{.Name}}'`
|
||||
cp $GOPATH/ossfuzz_coverage_runner.go ./"${function,,}"_test.go
|
||||
sed -i -e 's/FuzzFunction/'$function'/' ./"${function,,}"_test.go
|
||||
sed -i -e 's/mypackagebeingfuzzed/'$fuzzed_package'/' ./"${function,,}"_test.go
|
||||
|
|
|
@ -20,5 +20,5 @@ mkdir -p $GOPATH/src/github.com/gravitational
|
|||
cd $GOPATH/src/github.com/gravitational
|
||||
git clone https://github.com/gravitational/teleport.git
|
||||
|
||||
compile_go_fuzzer github.com/gravitational/teleport/lib/fuzz FuzzParseProxyJump utils_fuzz
|
||||
compile_go_fuzzer github.com/gravitational/teleport/lib/fuzz FuzzNewExpression parse_fuzz
|
||||
compile_go_fuzzer github.com/gravitational/teleport/lib/fuzz FuzzParseProxyJump utils_fuzz gofuzz
|
||||
compile_go_fuzzer github.com/gravitational/teleport/lib/fuzz FuzzNewExpression parse_fuzz gofuzz
|
||||
|
|
Loading…
Reference in New Issue