Merge pull request #19594 from ivanvc/rename-robustness-makefile
test/robustness: rename makefile.mk to Makefile
This commit is contained in:
commit
b988791c8e
5
Makefile
5
Makefile
@ -1,6 +1,8 @@
|
|||||||
|
REPOSITORY_ROOT := $(shell git rev-parse --show-toplevel)
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: build
|
all: build
|
||||||
include tests/robustness/makefile.mk
|
include $(REPOSITORY_ROOT)/tests/robustness/Makefile
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
@ -222,4 +224,3 @@ sync-toolchain-directive:
|
|||||||
.PHONY: markdown-diff-lint
|
.PHONY: markdown-diff-lint
|
||||||
markdown-diff-lint:
|
markdown-diff-lint:
|
||||||
./scripts/markdown_diff_lint.sh
|
./scripts/markdown_diff_lint.sh
|
||||||
|
|
@ -1,68 +1,76 @@
|
|||||||
|
REPOSITORY_ROOT := $(shell git rev-parse --show-toplevel)
|
||||||
|
|
||||||
.PHONY: test-robustness-reports
|
.PHONY: test-robustness-reports
|
||||||
test-robustness-reports: export GOTOOLCHAIN := go$(shell cat .go-version)
|
test-robustness-reports: export GOTOOLCHAIN := go$(shell cat $(REPOSITORY_ROOT)/.go-version)
|
||||||
test-robustness-reports:
|
test-robustness-reports:
|
||||||
cd ./tests && go test ./robustness/validate -v --count 1 --run TestDataReports
|
cd $(REPOSITORY_ROOT)/tests && go test ./robustness/validate -v --count 1 --run TestDataReports
|
||||||
|
|
||||||
# Test main and previous release branches
|
# Test main and previous release branches
|
||||||
|
|
||||||
|
# Note that executing make at the top-level repository needs a change in the
|
||||||
|
# directory. So, instead of calling just $(MAKE) or make, use this
|
||||||
|
# $(TOPLEVEL_MAKE) variable.
|
||||||
|
TOPLEVEL_MAKE := $(MAKE) --directory=$(REPOSITORY_ROOT)
|
||||||
|
|
||||||
.PHONY: test-robustness-main
|
.PHONY: test-robustness-main
|
||||||
test-robustness-main: /tmp/etcd-main-failpoints/bin /tmp/etcd-release-3.5-failpoints/bin
|
test-robustness-main: /tmp/etcd-main-failpoints/bin /tmp/etcd-release-3.5-failpoints/bin
|
||||||
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-main-failpoints/bin --bin-last-release=/tmp/etcd-release-3.5-failpoints/bin/etcd" $(MAKE) test-robustness
|
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-main-failpoints/bin --bin-last-release=/tmp/etcd-release-3.5-failpoints/bin/etcd" $(TOPLEVEL_MAKE) test-robustness
|
||||||
|
|
||||||
.PHONY: test-robustness-release-3.5
|
.PHONY: test-robustness-release-3.5
|
||||||
test-robustness-release-3.5: /tmp/etcd-release-3.5-failpoints/bin /tmp/etcd-release-3.4-failpoints/bin
|
test-robustness-release-3.5: /tmp/etcd-release-3.5-failpoints/bin /tmp/etcd-release-3.4-failpoints/bin
|
||||||
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.5-failpoints/bin --bin-last-release=/tmp/etcd-release-3.4-failpoints/bin/etcd" $(MAKE) test-robustness
|
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.5-failpoints/bin --bin-last-release=/tmp/etcd-release-3.4-failpoints/bin/etcd" $(TOPLEVEL_MAKE) test-robustness
|
||||||
|
|
||||||
.PHONY: test-robustness-release-3.4
|
.PHONY: test-robustness-release-3.4
|
||||||
test-robustness-release-3.4: /tmp/etcd-release-3.4-failpoints/bin
|
test-robustness-release-3.4: /tmp/etcd-release-3.4-failpoints/bin
|
||||||
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.4-failpoints/bin" $(MAKE) test-robustness
|
GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.4-failpoints/bin" $(TOPLEVEL_MAKE) test-robustness
|
||||||
|
|
||||||
# Reproduce historical issues
|
# Reproduce historical issues
|
||||||
|
|
||||||
.PHONY: test-robustness-issue14370
|
.PHONY: test-robustness-issue14370
|
||||||
test-robustness-issue14370: /tmp/etcd-v3.5.4-failpoints/bin
|
test-robustness-issue14370: /tmp/etcd-v3.5.4-failpoints/bin
|
||||||
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue14370 --count 100 --failfast --bin-dir=/tmp/etcd-v3.5.4-failpoints/bin' $(MAKE) test-robustness && \
|
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue14370 --count 100 --failfast --bin-dir=/tmp/etcd-v3.5.4-failpoints/bin' $(TOPLEVEL_MAKE) test-robustness && \
|
||||||
echo "Failed to reproduce" || echo "Successful reproduction"
|
echo "Failed to reproduce" || echo "Successful reproduction"
|
||||||
|
|
||||||
.PHONY: test-robustness-issue13766
|
.PHONY: test-robustness-issue13766
|
||||||
test-robustness-issue13766: /tmp/etcd-v3.5.2-failpoints/bin
|
test-robustness-issue13766: /tmp/etcd-v3.5.2-failpoints/bin
|
||||||
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue13766 --count 100 --failfast --bin-dir=/tmp/etcd-v3.5.2-failpoints/bin' $(MAKE) test-robustness && \
|
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue13766 --count 100 --failfast --bin-dir=/tmp/etcd-v3.5.2-failpoints/bin' $(TOPLEVEL_MAKE) test-robustness && \
|
||||||
echo "Failed to reproduce" || echo "Successful reproduction"
|
echo "Failed to reproduce" || echo "Successful reproduction"
|
||||||
|
|
||||||
.PHONY: test-robustness-issue14685
|
.PHONY: test-robustness-issue14685
|
||||||
test-robustness-issue14685: /tmp/etcd-v3.5.5-failpoints/bin
|
test-robustness-issue14685: /tmp/etcd-v3.5.5-failpoints/bin
|
||||||
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue14685 --count 100 --failfast --bin-dir=/tmp/etcd-v3.5.5-failpoints/bin' $(MAKE) test-robustness && \
|
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue14685 --count 100 --failfast --bin-dir=/tmp/etcd-v3.5.5-failpoints/bin' $(TOPLEVEL_MAKE) test-robustness && \
|
||||||
echo "Failed to reproduce" || echo "Successful reproduction"
|
echo "Failed to reproduce" || echo "Successful reproduction"
|
||||||
|
|
||||||
.PHONY: test-robustness-issue15271
|
.PHONY: test-robustness-issue15271
|
||||||
test-robustness-issue15271: /tmp/etcd-v3.5.7-failpoints/bin
|
test-robustness-issue15271: /tmp/etcd-v3.5.7-failpoints/bin
|
||||||
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue15271 --count 100 --failfast --bin-dir=/tmp/etcd-v3.5.7-failpoints/bin' $(MAKE) test-robustness && \
|
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue15271 --count 100 --failfast --bin-dir=/tmp/etcd-v3.5.7-failpoints/bin' $(TOPLEVEL_MAKE) test-robustness && \
|
||||||
echo "Failed to reproduce" || echo "Successful reproduction"
|
echo "Failed to reproduce" || echo "Successful reproduction"
|
||||||
|
|
||||||
.PHONY: test-robustness-issue17529
|
.PHONY: test-robustness-issue17529
|
||||||
test-robustness-issue17529: /tmp/etcd-v3.5.12-beforeSendWatchResponse/bin
|
test-robustness-issue17529: /tmp/etcd-v3.5.12-beforeSendWatchResponse/bin
|
||||||
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue17529 --count 100 --failfast --bin-dir=/tmp/etcd-v3.5.12-beforeSendWatchResponse/bin' $(MAKE) test-robustness && \
|
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue17529 --count 100 --failfast --bin-dir=/tmp/etcd-v3.5.12-beforeSendWatchResponse/bin' $(TOPLEVEL_MAKE) test-robustness && \
|
||||||
echo "Failed to reproduce" || echo "Successful reproduction"
|
echo "Failed to reproduce" || echo "Successful reproduction"
|
||||||
|
|
||||||
.PHONY: test-robustness-issue17780
|
.PHONY: test-robustness-issue17780
|
||||||
test-robustness-issue17780: /tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin
|
test-robustness-issue17780: /tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin
|
||||||
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue17780 --count 200 --failfast --bin-dir=/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin' make test-robustness && \
|
GO_TEST_FLAGS='-v --run=TestRobustnessRegression/Issue17780 --count 200 --failfast --bin-dir=/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin' $(TOPLEVEL_MAKE) test-robustness && \
|
||||||
echo "Failed to reproduce" || echo "Successful reproduction"
|
echo "Failed to reproduce" || echo "Successful reproduction"
|
||||||
|
|
||||||
.PHONY: test-robustness-issue18089
|
.PHONY: test-robustness-issue18089
|
||||||
test-robustness-issue18089: /tmp/etcd-v3.5.12-beforeSendWatchResponse/bin
|
test-robustness-issue18089: /tmp/etcd-v3.5.12-beforeSendWatchResponse/bin
|
||||||
GO_TEST_FLAGS='-v -run=TestRobustnessRegression/Issue18089 -count 100 -failfast --bin-dir=/tmp/etcd-v3.5.12-beforeSendWatchResponse/bin' make test-robustness && \
|
GO_TEST_FLAGS='-v -run=TestRobustnessRegression/Issue18089 -count 100 -failfast --bin-dir=/tmp/etcd-v3.5.12-beforeSendWatchResponse/bin' $(TOPLEVEL_MAKE) test-robustness && \
|
||||||
echo "Failed to reproduce" || echo "Successful reproduction"
|
echo "Failed to reproduce" || echo "Successful reproduction"
|
||||||
|
|
||||||
.PHONY: test-robustness-issue19179
|
.PHONY: test-robustness-issue19179
|
||||||
test-robustness-issue19179: /tmp/etcd-v3.5.17-failpoints/bin
|
test-robustness-issue19179: /tmp/etcd-v3.5.17-failpoints/bin
|
||||||
GO_TEST_FLAGS='-v -run=TestRobustnessRegression/Issue19179 -count 200 -failfast --bin-dir=/tmp/etcd-v3.5.17-failpoints/bin' make test-robustness && \
|
GO_TEST_FLAGS='-v -run=TestRobustnessRegression/Issue19179 -count 200 -failfast --bin-dir=/tmp/etcd-v3.5.17-failpoints/bin' $(TOPLEVEL_MAKE) test-robustness && \
|
||||||
echo "Failed to reproduce" || echo "Successful reproduction"
|
echo "Failed to reproduce" || echo "Successful reproduction"
|
||||||
|
|
||||||
|
|
||||||
# Failpoints
|
# Failpoints
|
||||||
|
|
||||||
GOPATH = $(shell go env GOPATH)
|
GOPATH = $(shell go env GOPATH)
|
||||||
GOFAIL_VERSION = $(shell cd tools/mod && go list -m -f {{.Version}} go.etcd.io/gofail)
|
GOFAIL_VERSION = $(shell cd $(REPOSITORY_ROOT)/tools/mod && go list -m -f {{.Version}} go.etcd.io/gofail)
|
||||||
|
|
||||||
.PHONY:install-gofail
|
.PHONY:install-gofail
|
||||||
install-gofail: $(GOPATH)/bin/gofail
|
install-gofail: $(GOPATH)/bin/gofail
|
||||||
@ -70,20 +78,20 @@ install-gofail: $(GOPATH)/bin/gofail
|
|||||||
.PHONY: gofail-enable
|
.PHONY: gofail-enable
|
||||||
gofail-enable: $(GOPATH)/bin/gofail
|
gofail-enable: $(GOPATH)/bin/gofail
|
||||||
$(GOPATH)/bin/gofail enable server/etcdserver/ server/lease/leasehttp server/storage/backend/ server/storage/mvcc/ server/storage/wal/ server/etcdserver/api/v3rpc/ server/etcdserver/api/membership/
|
$(GOPATH)/bin/gofail enable server/etcdserver/ server/lease/leasehttp server/storage/backend/ server/storage/mvcc/ server/storage/wal/ server/etcdserver/api/v3rpc/ server/etcdserver/api/membership/
|
||||||
cd ./server && go get go.etcd.io/gofail@${GOFAIL_VERSION}
|
cd $(REPOSITORY_ROOT)/server && go get go.etcd.io/gofail@${GOFAIL_VERSION}
|
||||||
cd ./etcdutl && go get go.etcd.io/gofail@${GOFAIL_VERSION}
|
cd $(REPOSITORY_ROOT)/etcdutl && go get go.etcd.io/gofail@${GOFAIL_VERSION}
|
||||||
cd ./etcdctl && go get go.etcd.io/gofail@${GOFAIL_VERSION}
|
cd $(REPOSITORY_ROOT)/etcdctl && go get go.etcd.io/gofail@${GOFAIL_VERSION}
|
||||||
cd ./tests && go get go.etcd.io/gofail@${GOFAIL_VERSION}
|
cd $(REPOSITORY_ROOT)/tests && go get go.etcd.io/gofail@${GOFAIL_VERSION}
|
||||||
|
|
||||||
.PHONY: gofail-disable
|
.PHONY: gofail-disable
|
||||||
gofail-disable: $(GOPATH)/bin/gofail
|
gofail-disable: $(GOPATH)/bin/gofail
|
||||||
$(GOPATH)/bin/gofail disable server/etcdserver/ server/lease/leasehttp server/storage/backend/ server/storage/mvcc/ server/storage/wal/ server/etcdserver/api/v3rpc/ server/etcdserver/api/membership/
|
$(GOPATH)/bin/gofail disable server/etcdserver/ server/lease/leasehttp server/storage/backend/ server/storage/mvcc/ server/storage/wal/ server/etcdserver/api/v3rpc/ server/etcdserver/api/membership/
|
||||||
cd ./server && go mod tidy
|
cd $(REPOSITORY_ROOT)/server && go mod tidy
|
||||||
cd ./etcdutl && go mod tidy
|
cd $(REPOSITORY_ROOT)/etcdutl && go mod tidy
|
||||||
cd ./etcdctl && go mod tidy
|
cd $(REPOSITORY_ROOT)/etcdctl && go mod tidy
|
||||||
cd ./tests && go mod tidy
|
cd $(REPOSITORY_ROOT)/tests && go mod tidy
|
||||||
|
|
||||||
$(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum
|
$(GOPATH)/bin/gofail: $(REPOSITORY_ROOT)/tools/mod/go.mod $(REPOSITORY_ROOT)/tools/mod/go.sum
|
||||||
go install go.etcd.io/gofail@${GOFAIL_VERSION}
|
go install go.etcd.io/gofail@${GOFAIL_VERSION}
|
||||||
|
|
||||||
# Build main and previous releases for robustness tests
|
# Build main and previous releases for robustness tests
|
Loading…
Reference in New Issue
Block a user