mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix Benchmark tests, remove a broken one & add two new (#15250)
* Benchmark Integration TESTS * CI: add benching-arm64 pipeline * BenchmarkRepo: name test case tests * Fix BenchmarkRepoBranchCommit beside Create new Branch * CI: benching use amd64 * rm total broken "BenchmarkRepo" * dont run benchmark in CI
This commit is contained in:
		@@ -76,7 +76,7 @@ func allowLFSFilters() []string {
 | 
			
		||||
	return filteredLFSGlobalArgs[:j]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func onGiteaRun(t *testing.T, callback func(*testing.T, *url.URL), prepare ...bool) {
 | 
			
		||||
func onGiteaRunTB(t testing.TB, callback func(testing.TB, *url.URL), prepare ...bool) {
 | 
			
		||||
	if len(prepare) == 0 || prepare[0] {
 | 
			
		||||
		defer prepareTestEnv(t, 1)()
 | 
			
		||||
	}
 | 
			
		||||
@@ -108,6 +108,12 @@ func onGiteaRun(t *testing.T, callback func(*testing.T, *url.URL), prepare ...bo
 | 
			
		||||
	callback(t, u)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func onGiteaRun(t *testing.T, callback func(*testing.T, *url.URL), prepare ...bool) {
 | 
			
		||||
	onGiteaRunTB(t, func(t testing.TB, u *url.URL) {
 | 
			
		||||
		callback(t.(*testing.T), u)
 | 
			
		||||
	}, prepare...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func doGitClone(dstLocalPath string, u *url.URL) func(*testing.T) {
 | 
			
		||||
	return func(t *testing.T) {
 | 
			
		||||
		assert.NoError(t, git.CloneWithArgs(context.Background(), u.String(), dstLocalPath, allowLFSFilters(), git.CloneRepoOptions{}))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user