diff options
| author | Ian Lance Taylor <iant@golang.org> | 2023-04-21 15:28:19 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-04-24 05:06:55 +0000 |
| commit | a5297f59a73aef5e965cd29b3e666836d6863243 (patch) | |
| tree | bfdfcdb2ab31b382fb984ae64f1d51a67515b68d | |
| parent | 5a10d8a2042224c77dc41e8efbbc124f10b26172 (diff) | |
| download | go-a5297f59a73aef5e965cd29b3e666836d6863243.tar.xz | |
runtime: use platform.RaceDetectorSupported for -race tests
Don't try to duplicate the list of targets that support -race.
Change-Id: I889d5c2f4884de89d88f8efdc89608aa73584a8a
Reviewed-on: https://go-review.googlesource.com/c/go/+/487575
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
| -rw-r--r-- | src/runtime/crash_cgo_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index 1d8d874ca1..5ed82d6eea 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.go @@ -368,8 +368,8 @@ func TestCgoPprofThreadNoTraceback(t *testing.T) { } func TestRaceProf(t *testing.T) { - if (runtime.GOOS != "linux" && runtime.GOOS != "freebsd") || runtime.GOARCH != "amd64" { - t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH) + if !platform.RaceDetectorSupported(runtime.GOOS, runtime.GOARCH) { + t.Skipf("skipping on %s/%s because race detector not supported", runtime.GOOS, runtime.GOARCH) } testenv.MustHaveGoRun(t) @@ -396,11 +396,12 @@ func TestRaceProf(t *testing.T) { } func TestRaceSignal(t *testing.T) { - t.Parallel() - if (runtime.GOOS != "linux" && runtime.GOOS != "freebsd") || runtime.GOARCH != "amd64" { - t.Skipf("not yet supported on %s/%s", runtime.GOOS, runtime.GOARCH) + if !platform.RaceDetectorSupported(runtime.GOOS, runtime.GOARCH) { + t.Skipf("skipping on %s/%s because race detector not supported", runtime.GOOS, runtime.GOARCH) } + t.Parallel() + testenv.MustHaveGoRun(t) // This test requires building various packages with -race, so |
