mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
.github: enable failpoints for integration tests
And introduce helper to toggle failpoints by makefile. Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
01851daabe
commit
b78b21405d
9
.github/workflows/tests-template.yaml
vendored
9
.github/workflows/tests-template.yaml
vendored
@ -41,13 +41,16 @@ jobs:
|
||||
GOARCH=${{ inputs.arch }} CPU=4 RACE='false' make test-smoke
|
||||
;;
|
||||
linux-integration-1-cpu)
|
||||
GOARCH=${{ inputs.arch }} CPU=1 RACE='false' make test-integration
|
||||
make install-gofail
|
||||
GOARCH=${{ inputs.arch }} CPU=1 RACE='false' FAILPOINTS='true' make test-integration
|
||||
;;
|
||||
linux-integration-2-cpu)
|
||||
GOARCH=${{ inputs.arch }} CPU=2 RACE='false' make test-integration
|
||||
make install-gofail
|
||||
GOARCH=${{ inputs.arch }} CPU=2 RACE='false' FAILPOINTS='true' make test-integration
|
||||
;;
|
||||
linux-integration-4-cpu)
|
||||
GOARCH=${{ inputs.arch }} CPU=4 RACE='false' make test-integration
|
||||
make install-gofail
|
||||
GOARCH=${{ inputs.arch }} CPU=4 RACE='false' FAILPOINTS='true' make test-integration
|
||||
;;
|
||||
linux-unit-4-cpu-race)
|
||||
GOARCH=${{ inputs.arch }} RACE='true' CPU='4' GO_TEST_FLAGS='-p=2' make test-unit
|
||||
|
10
Makefile
10
Makefile
@ -571,4 +571,12 @@ pull-docker-functional:
|
||||
GOFAIL_VERSION = $(shell cd tools/mod && go list -m -f {{.Version}} go.etcd.io/gofail)
|
||||
.PHONY: install-gofail
|
||||
install-gofail:
|
||||
go install go.etcd.io/gofail@${GOFAIL_VERSION}
|
||||
go install go.etcd.io/gofail@${GOFAIL_VERSION}
|
||||
|
||||
.PHONY: gofail-enable
|
||||
gofail-enable: install-gofail
|
||||
PASSES="toggle_failpoints" FAILPOINTS=true ./test.sh
|
||||
|
||||
.PHONY: gofail-disable
|
||||
gofail-disable: install-gofail
|
||||
PASSES="toggle_failpoints" ./test.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user