From 8dcb198f1414ccfce21e4da73ed10e6d2e461d98 Mon Sep 17 00:00:00 2001 From: Siyuan Zhang Date: Wed, 22 May 2024 08:44:24 -0700 Subject: [PATCH] workflow: change the target of make test-robustness to test-robustness-main Signed-off-by: Siyuan Zhang --- .github/workflows/robustness-template.yaml | 4 +--- tests/robustness/makefile.mk | 26 +++++++++++----------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/robustness-template.yaml b/.github/workflows/robustness-template.yaml index 1c502cff1c1..425c40e802e 100644 --- a/.github/workflows/robustness-template.yaml +++ b/.github/workflows/robustness-template.yaml @@ -72,9 +72,7 @@ jobs: EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness-release-3.4 ;; main) - make gofail-enable - make build - EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness + EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness-main ;; *) echo "Failed to find target ${ETCD_BRANCH}" diff --git a/tests/robustness/makefile.mk b/tests/robustness/makefile.mk index 85e91cb48a0..65c373e897d 100644 --- a/tests/robustness/makefile.mk +++ b/tests/robustness/makefile.mk @@ -3,11 +3,11 @@ test-robustness-reports: export GOTOOLCHAIN := go$(shell cat .go-version) test-robustness-reports: cd ./tests && go test ./robustness/validate -v --count 1 --run TestDataReports -# Test previous release branches +# Test main and previous release branches -.PHONY: test-robustness-release-3.6 -test-robustness-release-3.6: /tmp/etcd-release-3.6-failpoints/bin /tmp/etcd-release-3.5-failpoints/bin - GO_TEST_FLAGS="$${GO_TEST_FLAGS} --bin-dir=/tmp/etcd-release-3.6-failpoints/bin --bin-last-release=/tmp/etcd-release-3.5-failpoints/bin/etcd" make test-robustness +.PHONY: test-robustness-main +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 .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 @@ -66,7 +66,15 @@ gofail-disable: $(GOPATH)/bin/gofail $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum go install go.etcd.io/gofail@${GOFAIL_VERSION} -# Build previous releases for robustness tests +# Build main and previous releases for robustness tests + +/tmp/etcd-main-failpoints/bin: $(GOPATH)/bin/gofail + rm -rf /tmp/etcd-main-failpoints/ + mkdir -p /tmp/etcd-main-failpoints/ + cd /tmp/etcd-main-failpoints/; \ + git clone --depth 1 --branch main https://github.com/etcd-io/etcd.git .; \ + make gofail-enable; \ + make build; /tmp/etcd-v3.6.0-failpoints/bin: $(GOPATH)/bin/gofail rm -rf /tmp/etcd-v3.6.0-failpoints/ @@ -76,14 +84,6 @@ $(GOPATH)/bin/gofail: tools/mod/go.mod tools/mod/go.sum make gofail-enable; \ make build; -/tmp/etcd-release-3.6-failpoints/bin: $(GOPATH)/bin/gofail - rm -rf /tmp/etcd-release-3.6-failpoints/ - mkdir -p /tmp/etcd-release-3.6-failpoints/ - cd /tmp/etcd-release-3.6-failpoints/; \ - git clone --depth 1 --branch main https://github.com/etcd-io/etcd.git .; \ - make gofail-enable; \ - make build; - /tmp/etcd-v3.5.2-failpoints/bin: /tmp/etcd-v3.5.4-failpoints/bin: /tmp/etcd-v3.5.5-failpoints/bin: