Skip to content

x/build/cmd/golangbuild: run subrepo tests from outside their repositories #34352

@bcmills

Description

@bcmills

(This is essentially the golang.org/x/[…] version of #30316.)

go.mod files in testdata directories cut off the directory from the rest of the module (see #27852). As a result, the corresponding tests are likely to fail.

Unfortunately, at least one of the golang.org/x repos already includes such files: I am aware of some in golang.org/x/tools/go/packages/testdata (CC @heschik, @matloob), and there may be others as well.

Rather than expecting all Go developers to remember to avoid adding extraneous go.mod files, we should configure builders and TryBots to run the tests for golang.org/x modules outside the module, either in addition to or instead of running them from within a cloned repository.


(The simplest alternative I am aware of is to construct a symlink overlay within a temporary directory, as is done in various misc/cgo tests.)

CC @dmitshur @toothrot @bradfitz

Metadata

Metadata

Assignees

Labels

Buildersx/build issues (builders, bots, dashboards)FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.modules

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions