Skip to content

Commit cf16f8d

Browse files
committed
Makefile: Unset GITEA_CUSTOM when running tests
The test code expects that GITEA_CUSTOM is not set. While there is no reason to set this variable some misguided packagers set it globally in /etc/profile rather than in the service definition. Fixes: #36042
1 parent 1e777f9 commit cf16f8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ test: test-frontend test-backend ## test everything
432432
.PHONY: test-backend
433433
test-backend: ## test backend files
434434
@echo "Running go test with $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..."
435-
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_TEST_PACKAGES)
435+
@GITEA_CUSTOM= $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(GO_TEST_PACKAGES)
436436

437437
.PHONY: test-frontend
438438
test-frontend: node_modules ## test frontend files
@@ -453,7 +453,7 @@ test-check:
453453
.PHONY: test\#%
454454
test\#%:
455455
@echo "Running go test with -tags '$(TEST_TAGS)'..."
456-
@$(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -run $(subst .,/,$*) $(GO_TEST_PACKAGES)
456+
@GITEA_CUSTOM= $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -run $(subst .,/,$*) $(GO_TEST_PACKAGES)
457457

458458
.PHONY: coverage
459459
coverage:

0 commit comments

Comments
 (0)