Support running subtests manually (#10988)

Since GNU Make does not allow '/' in the target patterns,
we tranlate the subsequent '.' into '/' for "go test -run".

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
tokarchuk/v1.17
Mura Li 5 years ago committed by GitHub
parent ecb176851b
commit 514e269b1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      Makefile

@ -293,7 +293,7 @@ test-check:
.PHONY: test\#% .PHONY: test\#%
test\#%: test\#%:
$(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' -run $* $(GO_PACKAGES) $(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' -run $(subst .,/,$*) $(GO_PACKAGES)
.PHONY: coverage .PHONY: coverage
coverage: coverage:
@ -322,7 +322,7 @@ test-sqlite: integrations.sqlite.test
.PHONY: test-sqlite\#% .PHONY: test-sqlite\#%
test-sqlite\#%: integrations.sqlite.test test-sqlite\#%: integrations.sqlite.test
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.run $* GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*)
.PHONY: test-sqlite-migration .PHONY: test-sqlite-migration
test-sqlite-migration: migrations.sqlite.test test-sqlite-migration: migrations.sqlite.test
@ -341,7 +341,7 @@ test-mysql: integrations.mysql.test generate-ini-mysql
.PHONY: test-mysql\#% .PHONY: test-mysql\#%
test-mysql\#%: integrations.mysql.test generate-ini-mysql test-mysql\#%: integrations.mysql.test generate-ini-mysql
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.run $* GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*)
.PHONY: test-mysql-migration .PHONY: test-mysql-migration
test-mysql-migration: migrations.mysql.test generate-ini-mysql test-mysql-migration: migrations.mysql.test generate-ini-mysql
@ -360,7 +360,7 @@ test-mysql8: integrations.mysql8.test generate-ini-mysql8
.PHONY: test-mysql8\#% .PHONY: test-mysql8\#%
test-mysql8\#%: integrations.mysql8.test generate-ini-mysql8 test-mysql8\#%: integrations.mysql8.test generate-ini-mysql8
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test -test.run $* GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test -test.run $(subst .,/,$*)
.PHONY: test-mysql8-migration .PHONY: test-mysql8-migration
test-mysql8-migration: migrations.mysql8.test generate-ini-mysql8 test-mysql8-migration: migrations.mysql8.test generate-ini-mysql8
@ -380,7 +380,7 @@ test-pgsql: integrations.pgsql.test generate-ini-pgsql
.PHONY: test-pgsql\#% .PHONY: test-pgsql\#%
test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.run $* GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*)
.PHONY: test-pgsql-migration .PHONY: test-pgsql-migration
test-pgsql-migration: migrations.pgsql.test generate-ini-pgsql test-pgsql-migration: migrations.pgsql.test generate-ini-pgsql
@ -399,7 +399,7 @@ test-mssql: integrations.mssql.test generate-ini-mssql
.PHONY: test-mssql\#% .PHONY: test-mssql\#%
test-mssql\#%: integrations.mssql.test generate-ini-mssql test-mssql\#%: integrations.mssql.test generate-ini-mssql
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.run $* GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*)
.PHONY: test-mssql-migration .PHONY: test-mssql-migration
test-mssql-migration: migrations.mssql.test generate-ini-mssql test-mssql-migration: migrations.mssql.test generate-ini-mssql

Loading…
Cancel
Save