From fe179ac3087d821bf426288f5c4e7244bac4d25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= Date: Sat, 4 Nov 2023 19:01:22 +0200 Subject: [PATCH] Makefile: enable race detection for unit tests (#6873) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's enable the race detection for unit tests. Closes https://github.com/thanos-io/thanos/issues/4664. Signed-off-by: Giedrius Statkevičius --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 845be8b088..7a81d95333 100644 --- a/Makefile +++ b/Makefile @@ -314,7 +314,7 @@ test: export THANOS_TEST_ALERTMANAGER_PATH= $(ALERTMANAGER) test: check-git install-tool-deps @echo ">> install thanos GOOPTS=${GOOPTS}" @echo ">> running unit tests (without /test/e2e). Do export THANOS_TEST_OBJSTORE_SKIP=GCS,S3,AZURE,SWIFT,COS,ALIYUNOSS,BOS,OCI,OBS if you want to skip e2e tests against all real store buckets. Current value: ${THANOS_TEST_OBJSTORE_SKIP}" - @go test -timeout 15m $(shell go list ./... | grep -v /vendor/ | grep -v /test/e2e); + @go test -race -timeout 15m $(shell go list ./... | grep -v /vendor/ | grep -v /test/e2e); .PHONY: test-local test-local: ## Runs test excluding tests for ALL object storage integrations.