]> Cypherpunks repositories - gostls13.git/commit
cmd/go: don't create test actions for incomplete packages
authorMichael Matloob <matloob@golang.org>
Fri, 13 Dec 2024 22:33:16 +0000 (17:33 -0500)
committerGopher Robot <gobot@golang.org>
Mon, 16 Dec 2024 21:43:25 +0000 (13:43 -0800)
commitd92c34a3870bace34724e69ec2516d59ae432d32
treeae5632d9e4d9c89f43db26d6fdd7631efb5dd081
parent3bd08b97921826c1b0a5fbf0789f4b49d7619977
cmd/go: don't create test actions for incomplete packages

If a package is incomplete, don't create the actions for building and
testing it. Instead report the errors for the package's dependencies
and report a setup failed error (similar to what we'd to for a load
error when producing the test packages). This produces similar errors to
what were produced by load.CheckPackageErrors while still produing the
test failure actions per package under test.

(I wasn't sure what to do about the last test case in test_setup_error.
I think it should be treated the same as other load errors?)

Fixes #70820

Change-Id: Ie95e3c158c50ed35a1f27237ef3db40502719993
Reviewed-on: https://go-review.googlesource.com/c/go/+/635856
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/go/internal/load/pkg.go
src/cmd/go/internal/test/test.go
src/cmd/go/testdata/script/test_json_build.txt
src/cmd/go/testdata/script/test_setup_error.txt