Merge pull request #46062 from vvoland/integration-no-fail-fast-23
[23.0 backport] hack/integration: Add TEST_INTEGRATION_FAIL_FAST
This commit is contained in:
commit
c4c2450972
2 changed files with 11 additions and 1 deletions
1
Makefile
1
Makefile
|
@ -57,6 +57,7 @@ DOCKER_ENVS := \
|
|||
-e GITHUB_ACTIONS \
|
||||
-e TEST_FORCE_VALIDATE \
|
||||
-e TEST_INTEGRATION_DIR \
|
||||
-e TEST_INTEGRATION_FAIL_FAST \
|
||||
-e TEST_SKIP_INTEGRATION \
|
||||
-e TEST_SKIP_INTEGRATION_CLI \
|
||||
-e TESTCOVERAGE \
|
||||
|
|
|
@ -66,6 +66,7 @@ run_test_integration() {
|
|||
run_test_integration_suites() {
|
||||
local flags="-test.v -test.timeout=${TIMEOUT} $TESTFLAGS"
|
||||
local dirs="$1"
|
||||
local failed=0
|
||||
for dir in ${dirs}; do
|
||||
if ! (
|
||||
cd "$dir"
|
||||
|
@ -96,8 +97,16 @@ run_test_integration_suites() {
|
|||
--junitfile="${ABS_DEST}/${pkgname//./-}-junit-report.xml" \
|
||||
--raw-command \
|
||||
-- go tool test2json -p "${pkgname}" -t ./test.main ${pkgtestflags}
|
||||
); then exit 1; fi
|
||||
); then
|
||||
if [ -n "${TEST_INTEGRATION_FAIL_FAST}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
failed=1
|
||||
fi
|
||||
done
|
||||
if [ $failed -eq 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
build_test_suite_binaries() {
|
||||
|
|
Loading…
Reference in a new issue