]> Cypherpunks.ru repositories - gostls13.git/commit
test,internal/testdir: don't set GOOS/GOARCH
authorAustin Clements <austin@google.com>
Mon, 8 May 2023 14:47:45 +0000 (10:47 -0400)
committerAustin Clements <austin@google.com>
Fri, 12 May 2023 12:34:59 +0000 (12:34 +0000)
commitb6c75c5fb114fd951a7e3d9aa569b9bcd06d6bc3
tree0e07a3e4ce58988a17f32492989b7788869be271
parent6693807668af34c77522a7d7104bbc21dad5f0c8
test,internal/testdir: don't set GOOS/GOARCH

The test directory driver currently sets the GOOS/GOARCH environment
variables if they aren't set. This appears to be in service of a
single test, test/env.go, which was introduced in September 2008 along
with os.Getenv. It's not entirely clear what that test is even trying
to check, since runtime.GOOS isn't necessarily the same as $GOOS. We
keep the test around because golang.org/x/tools/go/ssa/interp uses it
as a test case, but we simplify the test and eliminate the need for
the driver to set GOOS/GOARCH.

Change-Id: I5acc0093b557c95d1f0a526d031210256a68222d
Reviewed-on: https://go-review.googlesource.com/c/go/+/493601
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/internal/testdir/testdir_test.go
test/env.go