From 2ced4c44aeae2cf8c62bd80eb4d0c9d7104e52bb Mon Sep 17 00:00:00 2001 From: Ivan Valdes Date: Fri, 31 Jan 2025 22:04:33 -0800 Subject: [PATCH] Migrate robustness makefile to use the Go workspace Update the `GOFAIL_VERSION` variable in the Makefile to remove the unnecessary `cd tools/mod` command, leveraging the Go workspace. And remove the change in directories when installing it. Signed-off-by: Ivan Valdes --- tests/robustness/makefile.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/robustness/makefile.mk b/tests/robustness/makefile.mk index 94b3aa47b287..f43df60f7db5 100644 --- a/tests/robustness/makefile.mk +++ b/tests/robustness/makefile.mk @@ -57,7 +57,7 @@ test-robustness-issue18089: /tmp/etcd-v3.5.12-beforeSendWatchResponse/bin # Failpoints GOPATH = $(shell go env GOPATH) -GOFAIL_VERSION = $(shell cd tools/mod && go list -m -f {{.Version}} go.etcd.io/gofail) +GOFAIL_VERSION = $(shell go list -m -f {{.Version}} go.etcd.io/gofail) .PHONY:install-gofail install-gofail: $(GOPATH)/bin/gofail @@ -111,7 +111,7 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum (cd server; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ (cd etcdctl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ (cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ - (cd tools/mod; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ + (go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ FAILPOINTS=true ./build; /tmp/etcd-v3.5.12-beforeSendWatchResponse/bin: $(GOPATH)/bin/gofail @@ -126,7 +126,7 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum (cd server; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ (cd etcdctl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ (cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ - (cd tools/mod; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ + (go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ FAILPOINTS=true ./build; /tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin: $(GOPATH)/bin/gofail @@ -140,7 +140,7 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum (cd server; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ (cd etcdctl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ (cd etcdutl; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ - (cd tools/mod; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ + (go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ FAILPOINTS=true ./build; /tmp/etcd-release-3.5-failpoints/bin: $(GOPATH)/bin/gofail @@ -149,7 +149,7 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum cd /tmp/etcd-release-3.5-failpoints/; \ git clone --depth 1 --branch release-3.5 https://github.com/etcd-io/etcd.git .; \ go get go.etcd.io/gofail@${GOFAIL_VERSION}; \ - (cd tools/mod; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ + (go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ FAILPOINTS=true ./build; /tmp/etcd-v3.4.23-failpoints/bin: @@ -159,7 +159,7 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum cd /tmp/etcd-v3.4.$*-failpoints/; \ git clone --depth 1 --branch v3.4.$* https://github.com/etcd-io/etcd.git .; \ go get go.etcd.io/gofail@${GOFAIL_VERSION}; \ - (cd tools/mod; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ + (go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ FAILPOINTS=true ./build; /tmp/etcd-release-3.4-failpoints/bin: $(GOPATH)/bin/gofail @@ -168,5 +168,5 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum cd /tmp/etcd-release-3.4-failpoints/; \ git clone --depth 1 --branch release-3.4 https://github.com/etcd-io/etcd.git .; \ go get go.etcd.io/gofail@${GOFAIL_VERSION}; \ - (cd tools/mod; go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ + (go get go.etcd.io/gofail@${GOFAIL_VERSION}); \ FAILPOINTS=true ./build;