1
0
mirror of https://github.com/golang/go synced 2024-11-18 19:24:39 -07:00

dashboard/builder: log to stderr when a build fails

Fixes golang/go#9593

Change-Id: I62c8152995db05945fb0c3dd5c62915e45aaeff9
Reviewed-on: https://go-review.googlesource.com/2737
Reviewed-by: Burcu Dogan <jbd@google.com>
This commit is contained in:
Brad Fitzpatrick 2015-01-14 15:38:29 -08:00
parent 31ce909f96
commit d272cc0504
2 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ func run(cmd *exec.Cmd, opts ...runOpt) error {
log.Printf("running %v in %v", a.cmd.Args, a.cmd.Dir)
}
if err := cmd.Start(); err != nil {
log.Printf("failed to start command %v: %v", a.cmd.Args, err)
return err
}
err := timeout(a.timeout, cmd.Wait)

View File

@ -421,6 +421,7 @@ func (b *Builder) buildHash(hash string) error {
buildLog, runTime, err := b.buildRepoOnHash(workpath, hash, b.buildCmd())
if err != nil {
log.Printf("%s failed at %v: %v", b.name, hash, err)
// record failure
return b.recordResult(false, "", hash, "", buildLog, runTime)
}