diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2021-11-01 20:25:48 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2021-11-02 06:19:33 +0000 |
| commit | 4633b2db4bec605d7920295322d19f895ae89964 (patch) | |
| tree | 65e373ce1201356ca6935dc442610305baa7f339 /src/internal/cpu | |
| parent | a97c527ac491cc13f6778010a2a81c84642ea1ca (diff) | |
| download | go-4633b2db4bec605d7920295322d19f895ae89964.tar.xz | |
cmd/go, internal/cpu: use internal/godebug in tests
Change-Id: Ifdf67e778e88ee70780428aa5479d2e091752a3a
Reviewed-on: https://go-review.googlesource.com/c/go/+/360605
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/internal/cpu')
| -rw-r--r-- | src/internal/cpu/cpu_test.go | 3 | ||||
| -rw-r--r-- | src/internal/cpu/cpu_x86_test.go | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/internal/cpu/cpu_test.go b/src/internal/cpu/cpu_test.go index 06ad20800f..8c21256b34 100644 --- a/src/internal/cpu/cpu_test.go +++ b/src/internal/cpu/cpu_test.go @@ -6,6 +6,7 @@ package cpu_test import ( . "internal/cpu" + "internal/godebug" "internal/testenv" "os" "os/exec" @@ -52,7 +53,7 @@ func TestDisableAllCapabilities(t *testing.T) { func TestAllCapabilitiesDisabled(t *testing.T) { MustHaveDebugOptionsSupport(t) - if os.Getenv("GODEBUG") != "cpu.all=off" { + if godebug.Get("cpu.all") != "off" { t.Skipf("skipping test: GODEBUG=cpu.all=off not set") } diff --git a/src/internal/cpu/cpu_x86_test.go b/src/internal/cpu/cpu_x86_test.go index 0fef065f20..c8be210055 100644 --- a/src/internal/cpu/cpu_x86_test.go +++ b/src/internal/cpu/cpu_x86_test.go @@ -8,7 +8,7 @@ package cpu_test import ( . "internal/cpu" - "os" + "internal/godebug" "testing" ) @@ -25,7 +25,7 @@ func TestDisableSSE3(t *testing.T) { func TestSSE3DebugOption(t *testing.T) { MustHaveDebugOptionsSupport(t) - if os.Getenv("GODEBUG") != "cpu.sse3=off" { + if godebug.Get("cpu.sse3") != "off" { t.Skipf("skipping test: GODEBUG=cpu.sse3=off not set") } |
