github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/test/fuzz/oss-fuzz-build.sh (about) 1 #!/bin/bash 2 # This script is invoked by OSS-Fuzz to run fuzz tests against Tendermint core. 3 # See https://github.com/google/oss-fuzz/blob/master/projects/tendermint/build.sh 4 set -euo pipefail 5 6 export FUZZ_ROOT="github.com/tendermint/tendermint" 7 8 build_go_fuzzer() { 9 local function="$1" 10 local fuzzer="$2" 11 12 go run github.com/orijtech/otils/corpus2ossfuzz@latest -o "$OUT"/"$fuzzer"_seed_corpus.zip -corpus test/fuzz/tests/testdata/fuzz/"$function" 13 compile_native_go_fuzzer "$FUZZ_ROOT"/test/fuzz/tests "$function" "$fuzzer" 14 } 15 16 go get github.com/AdamKorcz/go-118-fuzz-build/utils 17 go get github.com/prometheus/common/expfmt@v0.32.1 18 19 build_go_fuzzer FuzzP2PSecretConnection fuzz_p2p_secretconnection 20 21 build_go_fuzzer FuzzMempool fuzz_mempool 22 23 build_go_fuzzer FuzzRPCJSONRPCServer fuzz_rpc_jsonrpc_server