tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
tg.run("test", "vetcycle") // must not fail; #22890
+
+ tg.runFail("test", "vetfail/...")
+ tg.grepStderr(`Printf format %d`, "did not diagnose bad Printf")
+ tg.grepStdout(`ok\s+vetfail/p2`, "did not run vetfail/p2")
}
func TestInstallDeps(t *testing.T) {
Func: c.builderRunTest,
Deps: []*work.Action{buildAction},
Package: p,
- IgnoreFail: true,
+ IgnoreFail: true, // run (prepare output) even if build failed
TryCache: c.tryCache,
Objdir: testDir,
}
addTestVet(b, pxtest, runAction, installAction)
}
cleanAction = &work.Action{
- Mode: "test clean",
- Func: builderCleanTest,
- Deps: []*work.Action{runAction},
- Package: p,
- Objdir: testDir,
+ Mode: "test clean",
+ Func: builderCleanTest,
+ Deps: []*work.Action{runAction},
+ Package: p,
+ IgnoreFail: true, // clean even if test failed
+ Objdir: testDir,
}
printAction = &work.Action{
- Mode: "test print",
- Func: builderPrintTest,
- Deps: []*work.Action{cleanAction},
- Package: p,
+ Mode: "test print",
+ Func: builderPrintTest,
+ Deps: []*work.Action{cleanAction},
+ Package: p,
+ IgnoreFail: true, // print even if test failed
}
}
if installAction != nil {