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
ef2805fb50
commit
609be39ea9
9
.github/workflows/tests.yaml
vendored
9
.github/workflows/tests.yaml
vendored
@ -38,13 +38,16 @@ jobs:
|
||||
GOARCH=amd64 PASSES='fmt bom dep' ./test
|
||||
;;
|
||||
linux-amd64-integration-1-cpu)
|
||||
GOARCH=amd64 CPU=1 RACE='false' make test-integration
|
||||
make install-gofail
|
||||
GOARCH=amd64 CPU=1 RACE='false' FAILPOINTS='true' make test-integration
|
||||
;;
|
||||
linux-amd64-integration-2-cpu)
|
||||
GOARCH=amd64 CPU=2 RACE='false' make test-integration
|
||||
make install-gofail
|
||||
GOARCH=amd64 CPU=2 RACE='false' FAILPOINTS='true' make test-integration
|
||||
;;
|
||||
linux-amd64-integration-4-cpu)
|
||||
GOARCH=amd64 CPU=4 RACE='false' make test-integration
|
||||
make install-gofail
|
||||
GOARCH=amd64 CPU=4 RACE='false' FAILPOINTS='true' make test-integration
|
||||
;;
|
||||
linux-amd64-functional)
|
||||
./build && GOARCH=amd64 PASSES='functional' ./test
|
||||
|
9
Makefile
9
Makefile
@ -538,3 +538,12 @@ GOFAIL_VERSION = $(shell cd tools/mod && go list -m -f {{.Version}} go.etcd.io/g
|
||||
.PHONY: install-gofail
|
||||
install-gofail:
|
||||
go install go.etcd.io/gofail@${GOFAIL_VERSION}
|
||||
|
||||
|
||||
.PHONY: gofail-enable
|
||||
gofail-enable: install-gofail
|
||||
PASSES="toggle_failpoints" FAILPOINTS=true ./test
|
||||
|
||||
.PHONY: gofail-disable
|
||||
gofail-disable: install-gofail
|
||||
PASSES="toggle_failpoints" ./test
|
||||
|
4
test
4
test
@ -690,6 +690,10 @@ function build_cov_pass {
|
||||
go test -tags cov -c -covermode=set -coverpkg="$PKGS_COMMA" -o "${out}/etcdctl_test" "${REPO_PATH}/etcdctl"
|
||||
}
|
||||
|
||||
function toggle_failpoints_pass {
|
||||
toggle_failpoints_default
|
||||
}
|
||||
|
||||
# fail fast on static tests
|
||||
function build_pass {
|
||||
echo "Checking build..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user