This commit is contained in:
wxiaoguang
2026-04-25 20:42:15 +08:00
parent 9294e969b0
commit 1d6a95f80a
2 changed files with 2 additions and 2 deletions

View File

@@ -198,7 +198,7 @@ func runGitTests(m interface{ Run() int }) int {
setting.Git.HomePath = gitHomePath
if err = InitFull(); err != nil {
return testlogger.MainErrorf("failed to call Init: %s", err)
return testlogger.MainErrorf("failed to call Init: %v", err)
}
return m.Run()
}

View File

@@ -118,7 +118,7 @@ func PrintCurrentTest(t testing.TB, skip ...int) func() {
deferHasRun := false
t.Cleanup(func() {
if !deferHasRun {
stdoutPrintf("!!! %s defer function hasn't been run but Cleanup is called, usually caused by panic\n", t.Name())
stdoutPrintf("!!! %s: defer function hasn't been run but Cleanup is called, usually caused by panic\n", t.Name())
}
})
stdoutPrintf("=== %s (%s:%d)\n", log.NewColoredValue(t.Name()), strings.TrimPrefix(filename, prefix), line)