From 48d4412c8410d696be377aced0a94e485fc68ce4 Mon Sep 17 00:00:00 2001 From: Catena cyber <35799796+catenacyber@users.noreply.github.com> Date: Wed, 24 Feb 2021 18:21:23 +0100 Subject: [PATCH] Fixes go-quic corpuses build (#5250) * Fixes go-quic corpuses build * fixup * Fixes minify build * Do not generate corpuses for quic-go coverage --- projects/minify/build.sh | 2 +- projects/quic-go/build.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/projects/minify/build.sh b/projects/minify/build.sh index 5a71aca8d..1c031678a 100755 --- a/projects/minify/build.sh +++ b/projects/minify/build.sh @@ -14,4 +14,4 @@ # limitations under the License. # ################################################################################ -./tests/oss-fuzz-build.sh +./minify/tests/oss-fuzz-build.sh diff --git a/projects/quic-go/build.sh b/projects/quic-go/build.sh index 3e3d4abae..4ed3b62d0 100644 --- a/projects/quic-go/build.sh +++ b/projects/quic-go/build.sh @@ -32,13 +32,17 @@ compile_go_fuzzer github.com/lucas-clemente/quic-go/fuzzing/transportparameters compile_go_fuzzer github.com/lucas-clemente/quic-go/fuzzing/tokens Fuzz token_fuzzer compile_go_fuzzer github.com/lucas-clemente/quic-go/fuzzing/handshake Fuzz handshake_fuzzer +if [ $SANITIZER == "coverage" ]; then + # no need for corpuses if coverage + exit 0 +fi # generate seed corpora -go generate fuzzing/... +go generate ./fuzzing/... -zip --quiet -r $OUT/header_fuzzer_seed_corpus.zip $GOPATH/src/github.com/lucas-clemente/quic-go/fuzzing/header/corpus -zip --quiet -r $OUT/frame_fuzzer_seed_corpus.zip $GOPATH/src/github.com/lucas-clemente/quic-go/fuzzing/frames/corpus -zip --quiet -r $OUT/transportparameter_fuzzer_seed_corpus.zip $GOPATH/src/github.com/lucas-clemente/quic-go/fuzzing/transportparameters/corpus -zip --quiet -r $OUT/handshake_fuzzer_seed_corpus.zip $GOPATH/src/github.com/lucas-clemente/quic-go/fuzzing/handshake/corpus +zip --quiet -r $OUT/header_fuzzer_seed_corpus.zip fuzzing/header/corpus +zip --quiet -r $OUT/frame_fuzzer_seed_corpus.zip fuzzing/frames/corpus +zip --quiet -r $OUT/transportparameter_fuzzer_seed_corpus.zip fuzzing/transportparameters/corpus +zip --quiet -r $OUT/handshake_fuzzer_seed_corpus.zip fuzzing/handshake/corpus ) # for debugging