This is an automated email from the ASF dual-hosted git repository.
dcelasun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new e0e1a08 THRIFT-4855: Pin golang/mock to 1.2.0
e0e1a08 is described below
commit e0e1a088d6857fd5ca9044c0a330fb2ad54020b4
Author: D. Can Celasun <[email protected]>
AuthorDate: Fri May 10 09:18:11 2019 +0200
THRIFT-4855: Pin golang/mock to 1.2.0
The latest version (1.3.0) requires us to switch to Go modules for our
tests, but that's not trivial given our directory structure.
For now, just fix the CI issues by pinning the version.
---
test/go/Makefile.am | 3 +--
test/go/genmock.sh | 15 +++++++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/test/go/Makefile.am b/test/go/Makefile.am
index 6da8339..3cf6a70 100644
--- a/test/go/Makefile.am
+++ b/test/go/Makefile.am
@@ -58,8 +58,7 @@ check: gopath genmock
GOPATH=`pwd` $(GO) test -v common/...
genmock: gopath
- GOPATH=`pwd` $(GO) install github.com/golang/mock/mockgen
- GOPATH=`pwd` bin/mockgen -destination=src/common/mock_handler.go
-package=common gen/thrifttest ThriftTest
+ sh genmock.sh
EXTRA_DIST = \
src/bin \
diff --git a/test/go/genmock.sh b/test/go/genmock.sh
new file mode 100644
index 0000000..3ba41b9
--- /dev/null
+++ b/test/go/genmock.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+
+export GOPATH=`pwd`
+export GOBIN=`pwd`/bin
+export GO111MODULE=off
+
+mkdir -p src/github.com/golang/mock
+cd src/github.com/golang
+curl -fsSL https://github.com/golang/mock/archive/v1.2.0.tar.gz -o mock.tar.gz
+tar -xzvf mock.tar.gz -C mock --strip-components=1
+cd mock/mockgen
+go install .
+cd ../../../../../
+bin/mockgen -destination=src/common/mock_handler.go -package=common
gen/thrifttest ThriftTest