]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] test: cleanup 'go env' and -goexperiment
authorMatthew Dempsky <mdempsky@google.com>
Fri, 2 Jul 2021 22:42:20 +0000 (15:42 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 22 Jul 2021 17:01:49 +0000 (17:01 +0000)
commit311baf65f49f4b15396f7e88c05bc97d47f2e4ed
tree5ecde5c97c29be32465b298eb4c37c3ff12ffe5b
parentb7149b781fda907078b9312d301ea384e91482ef
[dev.typeparams] test: cleanup 'go env' and -goexperiment

This CL makes two related changes:

1. It uses 'go env -json' to query the environment configuration,
rather than attempting to manually reconstruct the values that cmd/go
is going to use.

2. It changes the -goexperiment flag to *extend* any ambient
GOEXPERIMENT configuration. Notably, this means that '-goexperiment
fieldtrack' now tests fieldtracking in conjunction with any other
experiments (e.g., unified IR). Tests that want to test an exact
GOEXPERIMENT config should use '-goexperiment none,foo' instead.

Change-Id: I96a97198209e540e934fe7035110c3ae3a8f0e6a
Reviewed-on: https://go-review.googlesource.com/c/go/+/332610
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
test/run.go