-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor/importgraph: set env from packagestest.Export and check erro…
…rs from Build This test was written for GOPATH mode, and subsequently updated to use packagestest at a time when GO111MODULE defaulted to "auto" (in this case, off). As a result, the test was failing to set environment variables relevant to the test, such as GO111MODULE=off. The missing environment was causing errors that were subsequently masked by a missing error check: the errors returned by importgraph.Build were only read in an "if false" block. This CL adds the missing environment variables and error checks. Using the correct environment may or may not fix the observed test failures. For golang/go#37823 Change-Id: I75844e6fdf47222aa4f953c8c4fbcc93cec606c9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/367846 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org>
- Loading branch information
Bryan C. Mills
committed
Nov 30, 2021
1 parent
2c9b078
commit 1fd30d2
Showing
1 changed file
with
95 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters