test(path): Optimize unit test execution results

This commit is contained in:
Flc゛ 2024-03-12 14:27:15 +08:00
parent baf4c15e41
commit 37a3a17959

View File

@ -81,7 +81,10 @@ func TestPathCleanMallocs(t *testing.T) {
t.Skip("skipping malloc count in short mode")
}
runtime.GC()
if runtime.GOMAXPROCS(0) > 1 {
t.Skip("skipping malloc count; GOMAXPROCS>1")
return
}
for _, test := range cleanTests {
allocs := testing.AllocsPerRun(100, func() { cleanPath(test.result) })