mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	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>
This commit is contained in:
		
							
								
								
									
										12
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Makefile
									
									
									
									
									
								
							@@ -293,7 +293,7 @@ test-check:
 | 
			
		||||
 | 
			
		||||
.PHONY: 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
 | 
			
		||||
coverage:
 | 
			
		||||
@@ -322,7 +322,7 @@ test-sqlite: integrations.sqlite.test
 | 
			
		||||
 | 
			
		||||
.PHONY: test-sqlite\#%
 | 
			
		||||
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
 | 
			
		||||
test-sqlite-migration:  migrations.sqlite.test
 | 
			
		||||
@@ -341,7 +341,7 @@ test-mysql: integrations.mysql.test generate-ini-mysql
 | 
			
		||||
 | 
			
		||||
.PHONY: test-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
 | 
			
		||||
test-mysql-migration: migrations.mysql.test generate-ini-mysql
 | 
			
		||||
@@ -360,7 +360,7 @@ test-mysql8: integrations.mysql8.test generate-ini-mysql8
 | 
			
		||||
 | 
			
		||||
.PHONY: test-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
 | 
			
		||||
test-mysql8-migration: migrations.mysql8.test generate-ini-mysql8
 | 
			
		||||
@@ -380,7 +380,7 @@ test-pgsql: integrations.pgsql.test generate-ini-pgsql
 | 
			
		||||
 | 
			
		||||
.PHONY: test-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
 | 
			
		||||
test-pgsql-migration: migrations.pgsql.test generate-ini-pgsql
 | 
			
		||||
@@ -399,7 +399,7 @@ test-mssql: integrations.mssql.test generate-ini-mssql
 | 
			
		||||
 | 
			
		||||
.PHONY: test-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
 | 
			
		||||
test-mssql-migration: migrations.mssql.test generate-ini-mssql
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user