.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:
Wei Fu 2024-04-04 14:50:00 +08:00
parent 01851daabe
commit b78b21405d
3 changed files with 19 additions and 4 deletions

View File

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

View File

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

View File

@ -709,6 +709,10 @@ function mod_tidy_pass {
run_for_modules mod_tidy_for_module
}
function toggle_failpoints_pass {
toggle_failpoints_default
}
########### MAIN ###############################################################
function run_pass {