From d272cc0504d044205c5de2943a4cd53110371dd9 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 14 Jan 2015 15:38:29 -0800 Subject: [PATCH] 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 --- dashboard/builder/exec.go | 1 + dashboard/builder/main.go | 1 + 2 files changed, 2 insertions(+) diff --git a/dashboard/builder/exec.go b/dashboard/builder/exec.go index ddc1e899cf5..1b46ed1c3c2 100644 --- a/dashboard/builder/exec.go +++ b/dashboard/builder/exec.go @@ -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) diff --git a/dashboard/builder/main.go b/dashboard/builder/main.go index 211d8af5b54..9e7c1ed3953 100644 --- a/dashboard/builder/main.go +++ b/dashboard/builder/main.go @@ -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) }