...
1#!/bin/bash
2set -xe
3
4# We use fuzzit fork until go-fuzz will support go-modules
5mkdir -p /go/src/github.com/dvyukov
6cd /go/src/github.com/dvyukov
7git clone https://github.com/fuzzitdev/go-fuzz
8cd go-fuzz
9go get ./...
10go build ./...
11
12#go get -v -u ./protoc-gen-grpc-gateway/httprule
13cd /src/grpc-gateway
14go-fuzz-build -libfuzzer -o parse-http-rule.a ./protoc-gen-grpc-gateway/httprule
15clang-9 -fsanitize=fuzzer parse-http-rule.a -o parse-http-rule
16
17wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.29/fuzzit_Linux_x86_64
18chmod a+x fuzzit
19
20if [ -z "CIRCLE_PULL_REQUEST" ]; then
21 TYPE="fuzzing"
22else
23 TYPE="local-regression"
24fi
25./fuzzit create job --type ${TYPE} grpc-gateway/parse-http-rule parse-http-rule
View as plain text