Merge pull request #1128 from luoliwoshang/test/exit
build:exit when test fail
This commit is contained in:
@@ -513,6 +513,7 @@ func linkMainPkg(ctx *context, pkg *packages.Package, pkgs []*aPackage, conf *Co
|
|||||||
cmd.Run()
|
cmd.Run()
|
||||||
if s := cmd.ProcessState; s != nil {
|
if s := cmd.ProcessState; s != nil {
|
||||||
fmt.Fprintf(os.Stderr, "%s: exit code %d\n", app, s.ExitCode())
|
fmt.Fprintf(os.Stderr, "%s: exit code %d\n", app, s.ExitCode())
|
||||||
|
mockable.Exit(s.ExitCode())
|
||||||
}
|
}
|
||||||
case ModeRun:
|
case ModeRun:
|
||||||
args := make([]string, 0, len(conf.RunArgs)+1)
|
args := make([]string, 0, len(conf.RunArgs)+1)
|
||||||
|
|||||||
Reference in New Issue
Block a user