@@ -49,10 +49,14 @@ ifeq ($(HAS_GO), yes)
4949 CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS)
5050endif
5151
52- ifeq ($(OS ) , Windows_NT)
53- GOFLAGS := -v -buildmode=exe
54- EXECUTABLE ?= gitea.exe
55- else ifeq ($(OS), Windows)
52+ ifeq ($(GOOS ) ,windows)
53+ IS_WINDOWS := yes
54+ else ifeq ($(patsubst Windows%,Windows,$(OS)),Windows)
55+ ifeq ($(GOOS),)
56+ IS_WINDOWS := yes
57+ endif
58+ endif
59+ ifeq ($(IS_WINDOWS ) ,yes)
5660 GOFLAGS := -v -buildmode=exe
5761 EXECUTABLE ?= gitea.exe
5862else
@@ -167,10 +171,6 @@ TEST_MYSQL_HOST ?= mysql:3306
167171TEST_MYSQL_DBNAME ?= testgitea
168172TEST_MYSQL_USERNAME ?= root
169173TEST_MYSQL_PASSWORD ?=
170- TEST_MYSQL8_HOST ?= mysql8:3306
171- TEST_MYSQL8_DBNAME ?= testgitea
172- TEST_MYSQL8_USERNAME ?= root
173- TEST_MYSQL8_PASSWORD ?=
174174TEST_PGSQL_HOST ?= pgsql:5432
175175TEST_PGSQL_DBNAME ?= testgitea
176176TEST_PGSQL_USERNAME ?= postgres
@@ -282,12 +282,12 @@ clean:
282282 rm -rf $(EXECUTABLE ) $(DIST ) $(BINDATA_DEST ) $(BINDATA_HASH ) \
283283 integrations* .test \
284284 e2e* .test \
285- tests/integration/gitea-integration-pgsql/ tests/integration/gitea-integration-mysql/ tests/integration/gitea-integration-mysql8/ tests/integration/gitea-integration-sqlite/ \
286- tests/integration/gitea-integration-mssql/ tests/integration/ indexers-mysql/ tests/integration/indexers-mysql8/ tests/integration/indexers-pgsql tests/integration/indexers-sqlite \
287- tests/integration/indexers-mssql tests/ mysql.ini tests/mysql8 .ini tests/pgsql.ini tests/mssql.ini man/ \
288- tests/e2e/gitea-e2e-pgsql/ tests/e2e/gitea-e2e-mysql/ tests/e2e/gitea-e2e-mysql8/ tests/e2e/gitea-e2e-sqlite / \
289- tests/e2e/gitea-e2e-mssql/ tests/e2e/ indexers-mysql/ tests/e2e/indexers-mysql8/ tests/e2e/indexers-pgsql/ tests/e2e/indexers-sqlite / \
290- tests/e2e/indexers-mssql/ tests/e2e/ reports/ tests/e2e/test-artifacts/ tests/e2e/test-snapshots/
285+ tests/integration/gitea-integration-* \
286+ tests/integration/indexers-* \
287+ tests/mysql.ini tests/pgsql.ini tests/mssql.ini man/ \
288+ tests/e2e/gitea-e2e-* / \
289+ tests/e2e/indexers-* / \
290+ tests/e2e/reports/ tests/e2e/test-artifacts/ tests/e2e/test-snapshots/
291291
292292.PHONY : fmt
293293fmt :
@@ -551,27 +551,6 @@ test-mysql\#%: integrations.mysql.test generate-ini-mysql
551551.PHONY : test-mysql-migration
552552test-mysql-migration : migrations.mysql.test migrations.individual.mysql.test
553553
554- generate-ini-mysql8 :
555- sed -e ' s|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \
556- -e ' s|{{TEST_MYSQL8_DBNAME}}|${TEST_MYSQL8_DBNAME}|g' \
557- -e ' s|{{TEST_MYSQL8_USERNAME}}|${TEST_MYSQL8_USERNAME}|g' \
558- -e ' s|{{TEST_MYSQL8_PASSWORD}}|${TEST_MYSQL8_PASSWORD}|g' \
559- -e ' s|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
560- -e ' s|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
561- -e ' s|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \
562- tests/mysql8.ini.tmpl > tests/mysql8.ini
563-
564- .PHONY : test-mysql8
565- test-mysql8 : integrations.mysql8.test generate-ini-mysql8
566- GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql8.ini ./integrations.mysql8.test
567-
568- .PHONY : test-mysql8\# %
569- test-mysql8\#% : integrations.mysql8.test generate-ini-mysql8
570- GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql8.ini ./integrations.mysql8.test -test.run $(subst .,/,$* )
571-
572- .PHONY : test-mysql8-migration
573- test-mysql8-migration : migrations.mysql8.test migrations.individual.mysql8.test
574-
575554generate-ini-pgsql :
576555 sed -e ' s|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
577556 -e ' s|{{TEST_PGSQL_DBNAME}}|${TEST_PGSQL_DBNAME}|g' \
@@ -644,14 +623,6 @@ test-e2e-mysql: playwright e2e.mysql.test generate-ini-mysql
644623test-e2e-mysql\#% : playwright e2e.mysql.test generate-ini-mysql
645624 GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e/$*
646625
647- .PHONY : test-e2e-mysql8
648- test-e2e-mysql8 : playwright e2e.mysql8.test generate-ini-mysql8
649- GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test
650-
651- .PHONY : test-e2e-mysql8\# %
652- test-e2e-mysql8\#% : playwright e2e.mysql8.test generate-ini-mysql8
653- GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test -test.run TestE2e/$*
654-
655626.PHONY : test-e2e-pgsql
656627test-e2e-pgsql : playwright e2e.pgsql.test generate-ini-pgsql
657628 GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test
@@ -695,9 +666,6 @@ integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sq
695666integrations.mysql.test : git-check $(GO_SOURCES )
696667 $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/integration -o integrations.mysql.test
697668
698- integrations.mysql8.test : git-check $(GO_SOURCES )
699- $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/integration -o integrations.mysql8.test
700-
701669integrations.pgsql.test : git-check $(GO_SOURCES )
702670 $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/integration -o integrations.pgsql.test
703671
@@ -718,11 +686,6 @@ migrations.mysql.test: $(GO_SOURCES) generate-ini-mysql
718686 $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql.test
719687 GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql.ini ./migrations.mysql.test
720688
721- .PHONY : migrations.mysql8.test
722- migrations.mysql8.test : $(GO_SOURCES ) generate-ini-mysql8
723- $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql8.test
724- GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql8.ini ./migrations.mysql8.test
725-
726689.PHONY : migrations.pgsql.test
727690migrations.pgsql.test : $(GO_SOURCES ) generate-ini-pgsql
728691 $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.pgsql.test
@@ -744,13 +707,7 @@ migrations.individual.mysql.test: $(GO_SOURCES)
744707 GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql.ini $(GO ) test $(GOTESTFLAGS ) -tags ' $(TEST_TAGS)' $$ pkg; \
745708 done
746709
747- .PHONY : migrations.individual.mysql8.test
748- migrations.individual.mysql8.test : $(GO_SOURCES )
749- for pkg in $( shell $( GO) list code.gitea.io/gitea/models/migrations/...) ; do \
750- GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql8.ini $(GO ) test $(GOTESTFLAGS ) -tags ' $(TEST_TAGS)' $$ pkg; \
751- done
752-
753- .PHONY : migrations.individual.mysql8.test\# %
710+ .PHONY : migrations.individual.sqlite.test\# %
754711migrations.individual.sqlite.test\#% : $(GO_SOURCES ) generate-ini-sqlite
755712 GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/sqlite.ini $(GO ) test $(GOTESTFLAGS ) -tags ' $(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$*
756713
@@ -788,9 +745,6 @@ migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
788745e2e.mysql.test : $(GO_SOURCES )
789746 $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test
790747
791- e2e.mysql8.test : $(GO_SOURCES )
792- $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql8.test
793-
794748e2e.pgsql.test : $(GO_SOURCES )
795749 $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.pgsql.test
796750
0 commit comments