Skip to content

Commit

Permalink
cmd/go: keep WINDIR during TestScript
Browse files Browse the repository at this point in the history
TestScript executes PowerShell. And PowerShell appears to require
WINDIR environment variable to exists on windows-arm.

So keep WINDIR environment variable when running PowerShell.

Fixes #30711

Change-Id: I14dde6614347325a8f3caf994ea8ab05294450a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/168859
Run-TryBot: Alex Brainman <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
alexbrainman committed Mar 24, 2019
1 parent e770b5b commit 7722f6d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/cmd/go/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ type backgroundCmd struct {

var extraEnvKeys = []string{
"SYSTEMROOT", // must be preserved on Windows to find DLLs; golang.org/issue/25210
"WINDIR", // must be preserved on Windows to be able to run PowerShell command; golang.org/issue/30711
"LD_LIBRARY_PATH", // must be preserved on Unix systems to find shared libraries
"CC", // don't lose user settings when invoking cgo
"GO_TESTING_GOTOOLS", // for gccgo testing
Expand Down
1 change: 0 additions & 1 deletion src/cmd/go/testdata/script/build_acl_windows.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[!windows] stop
[arm] skip # TODO(golang.org/issue/30711): Skip broken test.
[!exec:icacls] skip
[!exec:powershell] skip

Expand Down

0 comments on commit 7722f6d

Please sign in to comment.