protobuf-go/internal/fuzz/oss-fuzz-build.sh
Damien Neil 81d297c66c internal/fuzz: support coverage builds with oss-fuzz
Use OSS-Fuzz's new compile_go_fuzzer script, which enables code
coverage.

Change-Id: Iff07ac09d054e8c881d819b4ce6d016ad2808978
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/272768
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Joe Tsai <joetsai@google.com>
2020-11-24 20:15:59 +00:00

14 lines
448 B
Bash

# Copyright 2020 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This script is executed by OSS-Fuzz's build to create fuzzer binaries.
for x in internal/fuzz/*; do
if [ -d $x/corpus ]; then
name=$(basename $x)
compile_go_fuzzer google.golang.org/protobuf/$x Fuzz $name protolegacy
zip -jr $OUT/${name}_seed_corpus.zip $x/corpus
fi
done