Fixes go-quic corpuses build (#5250)

* Fixes go-quic corpuses build

* fixup

* Fixes minify build

* Do not generate corpuses for quic-go coverage
This commit is contained in:
Catena cyber 2021-02-24 18:21:23 +01:00 committed by GitHub
parent e23e06fd12
commit 48d4412c84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -14,4 +14,4 @@
# limitations under the License.
#
################################################################################
./tests/oss-fuzz-build.sh
./minify/tests/oss-fuzz-build.sh

View File

@ -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