Skip to content

Commit

Permalink
Migrate robustness makefile to use the Go workspace
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ivanvc committed Feb 1, 2025
1 parent eee3f89 commit efdb0d3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/robustness/makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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;

0 comments on commit efdb0d3

Please sign in to comment.