From fcf0db98d7df0d26b52d14d969eb3a57194c278b Mon Sep 17 00:00:00 2001 From: James Liu Date: Thu, 13 Mar 2025 11:39:50 +1100 Subject: [PATCH 1/2] test: Limit package concurrency to 4 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b30b656d41..454e29477c 100644 --- a/Makefile +++ b/Makefile @@ -224,7 +224,7 @@ GIT_FILTER_REPO_SOURCE_DIR ?= ${DEPENDENCY_DIR}/git-filter-repo ## Go packages to test when using the test-go target. TEST_PACKAGES ?= ${SOURCE_DIR}/... ## Test options passed to `go test`. -TEST_OPTIONS ?= -count=1 +TEST_OPTIONS ?= -count=1 -p=4 ## Specify the output format used to print tests ["standard-verbose", "standard-quiet", "short"] TEST_FORMAT ?= short ## Specify the location where the JUnit-style format shall be written to. -- GitLab From 0fe2aa0b0ad2176cf9b52be6b1702fe077992399 Mon Sep 17 00:00:00 2001 From: James Liu Date: Thu, 13 Mar 2025 11:59:18 +1100 Subject: [PATCH 2/2] test: Enable the --rerun-fails flag --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 454e29477c..e6ae007d7d 100644 --- a/Makefile +++ b/Makefile @@ -267,7 +267,7 @@ find_go_sources = $(shell find ${SOURCE_DIR} -type d \( -path "${SO run_go_tests = PATH='${SOURCE_DIR}/internal/testhelper/testdata/home/bin:${PATH}' \ TEST_TMP_DIR='${TEST_TMP_DIR}' \ TEST_LOG_DIR='${TEST_LOG_DIR}' \ - ${GOTESTSUM} --format ${TEST_FORMAT} --junitfile '${TEST_JUNIT_REPORT}' --jsonfile '${TEST_JSON_REPORT}' -- -ldflags '${GO_LDFLAGS}' -tags '${SERVER_BUILD_TAGS}' ${TEST_OPTIONS} ${TEST_PACKAGES} + ${GOTESTSUM} --rerun-fails --packages $(TEST_PACKAGES) --format ${TEST_FORMAT} --junitfile '${TEST_JUNIT_REPORT}' --jsonfile '${TEST_JSON_REPORT}' -- -ldflags '${GO_LDFLAGS}' -tags '${SERVER_BUILD_TAGS}' ${TEST_OPTIONS} ${TEST_PACKAGES} ## Test options passed to `dlv test`. DEBUG_OPTIONS ?= $(patsubst -%,-test.%,${TEST_OPTIONS}) -- GitLab