From 79ce55b8886e5dd9549830311d34278ee75e99be Mon Sep 17 00:00:00 2001 From: AdamKorcz <44787359+AdamKorcz@users.noreply.github.com> Date: Thu, 4 Feb 2021 13:41:50 +0000 Subject: [PATCH] [tidb] Fix failing build (#5112) --- projects/tidb/Dockerfile | 2 +- projects/tidb/build.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/tidb/Dockerfile b/projects/tidb/Dockerfile index 86995d697..b06a2b5e8 100644 --- a/projects/tidb/Dockerfile +++ b/projects/tidb/Dockerfile @@ -15,6 +15,6 @@ ################################################################################ FROM gcr.io/oss-fuzz-base/base-builder -RUN go get github.com/pingcap/tidb/store +RUN git clone --depth 1 https://github.com/pingcap/tidb COPY build.sh $SRC/ WORKDIR $SRC/ diff --git a/projects/tidb/build.sh b/projects/tidb/build.sh index 9135a32d5..3f9717570 100755 --- a/projects/tidb/build.sh +++ b/projects/tidb/build.sh @@ -15,6 +15,13 @@ # ################################################################################ +# Insert empty main function +sed -i '23 i\func main(){}'\\n $SRC/tidb/plugin/conn_ip_example/conn_ip_example.go + +mkdir $GOPATH/src/github.com/pingcap +mv $SRC/tidb $GOPATH/src/github.com/pingcap/ +cd $GOPATH/src/github.com/pingcap/tidb && go get ./... + compile_go_fuzzer github.com/pingcap/tidb/types FuzzMarshalJSON fuzzMarshalJSON compile_go_fuzzer github.com/pingcap/tidb/types FuzzNewBitLiteral fuzzNewBitLiteral compile_go_fuzzer github.com/pingcap/tidb/types FuzzNewHexLiteral fuzzNewHexLiteral