Skip to content

Commit

Permalink
Merge pull request #18054 from siyuanfoundation/robust
Browse files Browse the repository at this point in the history
workflow: change the target of make test-robustness to test-robustness-main
  • Loading branch information
serathius authored May 22, 2024
2 parents f563c43 + 8dcb198 commit 6774334
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/robustness-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
26 changes: 13 additions & 13 deletions tests/robustness/makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand All @@ -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:
Expand Down

0 comments on commit 6774334

Please sign in to comment.