Merge pull request #18054 from siyuanfoundation/robust

workflow: change the target of make test-robustness to test-robustness-main
This commit is contained in:
Marek Siarkowicz 2024-05-22 19:54:11 +02:00 committed by GitHub
commit 67743348dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 16 deletions

View File

@ -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}"

View File

@ -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: