From a7b0327ff652dfe2d4fde75ea1efb2bd94260580 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 25 Sep 2026 16:32:51 +0200 Subject: [PATCH] chore: quote test name patterns in make targets (#39429) `test-backend#%` and `test-integration#%` passed the test name to the shell unquoted, so regex characters broke the command. For example `make 'test-backend#^(TestA|TestB)$'` failed with `syntax error near unexpected token '('`. The pattern is now single-quoted like the neighbouring `-tags` argument. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 22069147659..8c5a3c79d0a 100644 --- a/Makefile +++ b/Makefile @@ -403,7 +403,7 @@ test-check: .PHONY: test-backend\#% test-backend\#%: @echo "Running go test with -tags '$(TAGS)'..." - @$(GO) test $(GOTEST_FLAGS) -tags='$(TAGS)' -run $(subst .,/,$*) $(GO_TEST_PACKAGES) + @$(GO) test $(GOTEST_FLAGS) -tags='$(TAGS)' -run '$(subst .,/,$*)' $(GO_TEST_PACKAGES) .PHONY: coverage coverage: @@ -460,7 +460,7 @@ test-integration-compile: .PHONY: test-integration\#% test-integration\#%: $(EXECUTABLE) - $(GO) test $(GOTEST_FLAGS) -tags '$(TAGS)' -run $(subst .,/,$*) gitea.dev/tests/integration + $(GO) test $(GOTEST_FLAGS) -tags '$(TAGS)' -run '$(subst .,/,$*)' gitea.dev/tests/integration .PHONY: test-migration test-migration: migrations.integration.test migrations.individual.test