Commit 8cf579ab authored by Bryan C. Mills's avatar Bryan C. Mills

cmd/go: restore "go list" exit code for missing binary packages

Prior to CL 108156, "go list" exited with code 0 if there were missing binary packages.
Restore that behavior to fix the failing TestBinaryOnlyPackages.

Fixes golang/go#25784.

Change-Id: Iaeca6bcc840f5ac8f2a016cef131f5c59a8261a8
Reviewed-on: https://go-review.googlesource.com/117036Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 7b08e619
...@@ -4217,7 +4217,6 @@ func TestFatalInBenchmarkCauseNonZeroExitStatus(t *testing.T) { ...@@ -4217,7 +4217,6 @@ func TestFatalInBenchmarkCauseNonZeroExitStatus(t *testing.T) {
} }
func TestBinaryOnlyPackages(t *testing.T) { func TestBinaryOnlyPackages(t *testing.T) {
t.Skip("known failing test; see golang.org/issue/25784")
tooSlow(t) tooSlow(t)
tg := testgo(t) tg := testgo(t)
......
...@@ -405,6 +405,9 @@ func (b *Builder) build(a *Action) (err error) { ...@@ -405,6 +405,9 @@ func (b *Builder) build(a *Action) (err error) {
} }
a.Package.Stale = true a.Package.Stale = true
a.Package.StaleReason = "missing or invalid binary-only package" a.Package.StaleReason = "missing or invalid binary-only package"
if b.IsCmdList {
return nil
}
return fmt.Errorf("missing or invalid binary-only package") return fmt.Errorf("missing or invalid binary-only package")
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment