Lines Matching full:go
29 # in the case we are in the right directory, with go.mod but no go.sum
30 go mod tidy || true
31 # project was downloaded with go get if go list fails
32 go list $tags $path || { cd $GOPATH/pkg/mod/ && cd `echo $path | cut -d/ -f1-3 | awk '{print $1"@*"…
33 # project does not have go.mod if go list fails again
34 go list $tags $path || { go mod init $path && go mod tidy ;}
37 fuzzed_package=`go list $tags -f '{{.Name}}' $path`
38 abspath=`go list $tags -f {{.Dir}} $path`
40 cp $GOPATH/ossfuzz_coverage_runner.go ./"${function,,}"_test.go
41 sed -i -e 's/FuzzFunction/'$function'/' ./"${function,,}"_test.go
42 sed -i -e 's/mypackagebeingfuzzed/'$fuzzed_package'/' ./"${function,,}"_test.go
43 sed -i -e 's/TestFuzzCorpus/Test'$function'Corpus/' ./"${function,,}"_test.go
46 abspath_repo=`go list -m $tags -f {{.Dir}} $fuzzed_repo || go list $tags -f {{.Dir}} $fuzzed_repo`
47 # give equivalence to absolute paths in another file, as go test -cover uses golangish pkg.Dir
49 go test -run Test${function}Corpus -v $tags -coverpkg $fuzzed_repo/... -c -o $OUT/$fuzzer $path
51 # Compile and instrument all Go files relevant to this fuzz target.
52 echo "Running go-fuzz $tags -func $function -o $fuzzer.a $path"
53 go-fuzz $tags -func $function -o $fuzzer.a $path
55 # Link Go code ($fuzzer.a) with fuzzing engine to produce fuzz target binary.