@@ -242,9 +242,13 @@ clean:
242242 $(GO ) clean -i ./...
243243 rm -rf $(EXECUTABLE ) $(DIST ) $(BINDATA_DEST ) $(BINDATA_HASH ) \
244244 integrations* .test \
245+ e2e* .test \
245246 tests/integration/gitea-integration-pgsql/ tests/integration/gitea-integration-mysql/ tests/integration/gitea-integration-mysql8/ tests/integration/gitea-integration-sqlite/ \
246247 tests/integration/gitea-integration-mssql/ tests/integration/indexers-mysql/ tests/integration/indexers-mysql8/ tests/integration/indexers-pgsql tests/integration/indexers-sqlite \
247248 tests/integration/indexers-mssql tests/mysql.ini tests/mysql8.ini tests/pgsql.ini tests/mssql.ini man/
249+ tests/e2e/gitea-integration-pgsql/ tests/e2e/gitea-integration-mysql/ tests/e2e/gitea-integration-mysql8/ tests/e2e/gitea-integration-sqlite/ \
250+ tests/e2e/gitea-integration-mssql/ tests/e2e/indexers-mysql/ tests/e2e/indexers-mysql8/ tests/e2e/indexers-pgsql tests/e2e/indexers-sqlite \
251+ tests/e2e/indexers-mssql
248252
249253.PHONY : fmt
250254fmt :
@@ -512,57 +516,61 @@ test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test gen
512516
513517.PHONY : test-e2e%
514518# Use only file logging for end-to-end tests
515- test-e2e% : TEST_LOGGER ?= file TEST_TYPE ?= e2e
519+ test-e2e% : TEST_LOGGER ?= file
520+ test-e2e% : TEST_TYPE ?= e2e
516521
517522.PHONY : test-e2e
518523test-e2e : test-e2e-sqlite
519524
520- .PHONY : test-e2e\# %
521- test-e2e\#% : test-e2e-sqlite\# %
522- # Kind of a hack to get makefile to accept passing arguement
523- true
524-
525525.PHONY : test-e2e-sqlite
526- test-e2e-sqlite : TAGS+=sqlite sqlite_unlock_notify
527- test-e2e-sqlite : build generate-ini-sqlite
526+ test-e2e-sqlite : e2e.sqlite.test generate-ini-sqlite
528527 npx playwright install $(PLAYWRIGHT_FLAGS )
529- GITEA_ROOT=$(CURDIR ) GITEA_URL= " http://localhost:3003 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=tests/sqlite.ini ./tools/ e2e/run_e2e.sh
528+ GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test
530529
531530.PHONY : test-e2e-sqlite\# %
532- test-e2e-sqlite\#% : TAGS+=sqlite sqlite_unlock_notify
533- test-e2e-sqlite\#% : build generate-ini-sqlite
531+ test-e2e-sqlite\#% : e2e.sqlite.test generate-ini-sqlite
532+ npx playwright install $(PLAYWRIGHT_FLAGS )
533+ GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run $(subst .,/,$* )
534+
535+ .PHONY : test-e2e-mysql
536+ test-e2e-mysql : e2e.mysql.test generate-ini-mysql
537+ npx playwright install $(PLAYWRIGHT_FLAGS )
538+ GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql.ini ./e2e.mysql.test
539+
540+ .PHONY : test-e2e-mysql\# %
541+ test-e2e-mysql\#% : e2e.mysql.test generate-ini-mysql
534542 npx playwright install $(PLAYWRIGHT_FLAGS )
535- GITEA_URL= " http://localhost:3003 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/sqlite .ini E2E_TESTS= $* ./tools/ e2e/run_e2e.sh
543+ GITEA_ROOT= " $( CURDIR ) " GITEA_CONF=tests/mysql .ini ./ e2e.mysql.test -test.run $( subst .,/, $* )
536544
537545.PHONY : test-e2e-mysql8
538- test-e2e-mysql8 : build generate-ini-mysql8
546+ test-e2e-mysql8 : e2e.mysql8.test generate-ini-mysql8
539547 npx playwright install $(PLAYWRIGHT_FLAGS )
540- GITEA_URL= " http://localhost:3004 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/mysql8.ini ./tools/ e2e/run_e2e.sh
548+ GITEA_ROOT= " $( CURDIR ) " GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test
541549
542550.PHONY : test-e2e-mysql8\# %
543- test-e2e-mysql8\#% : build generate-ini-mysql8
551+ test-e2e-mysql8\#% : e2e.mysql8.test generate-ini-mysql8
544552 npx playwright install $(PLAYWRIGHT_FLAGS )
545- GITEA_URL= " http://localhost:3004 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/mysql8.ini E2E_TESTS= $* ./tools/ e2e/run_e2e.sh
553+ GITEA_ROOT= " $( CURDIR ) " GITEA_CONF=tests/mysql8.ini ./ e2e.mysql8.test -test.run $( subst .,/, $* )
546554
547555.PHONY : test-e2e-pgsql
548- test-e2e-pgsql : build generate-ini-pgsql
556+ test-e2e-pgsql : e2e.pgsql.test generate-ini-pgsql
549557 npx playwright install $(PLAYWRIGHT_FLAGS )
550- GITEA_URL= " http://localhost:3002 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/pgsql.ini ./tools/ e2e/run_e2e.sh
558+ GITEA_ROOT= " $( CURDIR ) " GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test
551559
552560.PHONY : test-e2e-pgsql\# %
553- test-e2e-pgsql\#% : build generate-ini-pgsql
561+ test-e2e-pgsql\#% : e2e.pgsql.test generate-ini-pgsql
554562 npx playwright install $(PLAYWRIGHT_FLAGS )
555- GITEA_URL= " http://localhost:3002 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/pgsql.ini E2E_TESTS= $* ./tools/ e2e/run_e2e.sh
563+ GITEA_ROOT= " $( CURDIR ) " GITEA_CONF=tests/pgsql.ini ./ e2e.pgsql.test -test.run $( subst .,/, $* )
556564
557565.PHONY : test-e2e-mssql
558- test-e2e-mssql : build generate-ini-mssql
566+ test-e2e-mssql : e2e.mssql.test generate-ini-mssql
559567 npx playwright install $(PLAYWRIGHT_FLAGS )
560- GITEA_ROOT=$(CURDIR ) GITEA_URL= " http://localhost:3003 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/mssql.ini ./tools/ e2e/run_e2e.sh
568+ GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mssql.ini ./e2e.mssql.test
561569
562570.PHONY : test-e2e-mssql\# %
563- test-e2e-mssql\#% : build generate-ini-mssql
571+ test-e2e-mssql\#% : e2e.mssql.test generate-ini-mssql
564572 npx playwright install $(PLAYWRIGHT_FLAGS )
565- GITEA_ROOT=$(CURDIR ) GITEA_URL= " http://localhost:3003 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/mssql.ini E2E_TESTS= $* ./tools/ e2e/run_e2e.sh
573+ GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mssql.ini ./ e2e.mssql.test -test.run $( subst .,/, $* )
566574
567575.PHONY : bench-sqlite
568576bench-sqlite : integrations.sqlite.test generate-ini-sqlite
@@ -649,6 +657,21 @@ migrations.individual.mssql.test: $(GO_SOURCES)
649657migrations.individual.sqlite.test : $(GO_SOURCES )
650658 $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/models/migrations -o migrations.individual.sqlite.test -tags ' $(TEST_TAGS)'
651659
660+ e2e.mysql.test : git-check $(GO_SOURCES )
661+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test
662+
663+ e2e.mysql8.test : git-check $(GO_SOURCES )
664+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql8.test
665+
666+ e2e.pgsql.test : git-check $(GO_SOURCES )
667+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.pgsql.test
668+
669+ e2e.mssql.test : git-check $(GO_SOURCES )
670+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.mssql.test
671+
672+ e2e.sqlite.test : git-check $(GO_SOURCES )
673+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.sqlite.test -tags ' $(TEST_TAGS)'
674+
652675.PHONY : check
653676check : test
654677
0 commit comments