build: return correct iteration count

Fixes golang/go#19034.

Change-Id: Idfb9d764bb4d8362c9837f6d177f0829a72e1365
Reviewed-on: https://go-review.googlesource.com/37238
Run-TryBot: David Lazar <lazard@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
pull/1/head
David Lazar 2017-02-19 16:45:04 -05:00
parent d8154158e2
commit 981a3bf009
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ func benchmark() driver.Result {
func benchmarkOnce() driver.Result {
// run 'go build -a'
res := driver.MakeResult()
res.N = 1
cmd := exec.Command("go", "build", "-o", "gobuild", "-a", "-p", os.Getenv("GOMAXPROCS"), "cmd/go")
out, err := driver.RunAndCollectSysStats(cmd, &res, 1, "build-")
if err != nil {