diff options
author | 2020-11-21 16:11:43 +0100 | |
---|---|---|
committer | 2020-11-21 07:11:43 -0800 | |
commit | 2db56c41743333db03e811b6687dca05620210d5 (patch) | |
tree | fc2d2ba21d3f39915216ac9158238236922b071b /projects/go-coredns | |
parent | e534f4fecc7c0992b105a79123ec97bb55ae2396 (diff) |
Golang project uses compile_go_fuzzer script (#4685)
* Golang project uses compile_go_fuzzer script
* Kubernetes project uses compile_go_fuzzer script
* Adds golang to ci covergae builds
* fixup
* Golang coverage with go modules
cf coredns project
Diffstat (limited to 'projects/go-coredns')
-rw-r--r-- | projects/go-coredns/Dockerfile | 3 | ||||
-rwxr-xr-x | projects/go-coredns/build.sh | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/projects/go-coredns/Dockerfile b/projects/go-coredns/Dockerfile index f77a4629..824e6d8f 100644 --- a/projects/go-coredns/Dockerfile +++ b/projects/go-coredns/Dockerfile @@ -15,7 +15,8 @@ ################################################################################ FROM gcr.io/oss-fuzz-base/base-builder -RUN git clone --depth 1 https://github.com/coredns/coredns coredns +ENV GO111MODULE=on +RUN go get github.com/coredns/coredns COPY build.sh $SRC/ WORKDIR $SRC/ diff --git a/projects/go-coredns/build.sh b/projects/go-coredns/build.sh index d1d021b7..16b10cae 100755 --- a/projects/go-coredns/build.sh +++ b/projects/go-coredns/build.sh @@ -17,13 +17,13 @@ # Same as usual except for added -tags gofuzz. +cd $GOPATH/pkg/mod/`go list -m github.com/coredns/coredns | sed 's/ /@/'` -cd coredns #make ls plugin/*/fuzz.go | while read target do fuzzed_plugin=`echo $target | cut -d'/' -f 2` - compile_go_fuzzer github.com/coredns/coredns/plugin/$fuzzed_plugin Fuzz fuzz_plugin_$fuzzed_plugin + compile_go_fuzzer github.com/coredns/coredns/plugin/$fuzzed_plugin Fuzz fuzz_plugin_$fuzzed_plugin gofuzz done -compile_go_fuzzer github.com/coredns/coredns/test Fuzz fuzz_core +compile_go_fuzzer github.com/coredns/coredns/test Fuzz fuzz_core gofuzz |