import (
"bytes"
+ "cmp"
"fmt"
"os"
"path"
// don't run two tests in parallel, they saturate the CPUs anyway, and running two
// causes memory issues in CI.
mg.Deps(TestRace)
- if isCI() {
- mg.Deps(CleanTest, UninstallAll)
- }
}
func testGoFlags() string {
return err
}
for _, pkg := range pkgs {
+ if err := cmp.Or(CleanTest(), UninstallAll()); err != nil {
+ return err
+ }
if err := runCmd(env, goexe, "test", "-p", "2", "-race", pkg, "-tags", buildTags()); err != nil {
return err
}
- mg.Deps(CleanTest, UninstallAll)
}
return nil