mirror of
https://github.com/golang/go.git
synced 2025-05-19 14:24:46 +00:00
cmd/cgo/internal/testsanitizers: check for go build and cgo in fuzzer and msan tests
Make sure the platform we are running the tests on can compile programs and has cgo support in order to run the fuzzer and msan tests. This is the same approach used by the asan tests, which share the same requirements. Fixes #64626 Change-Id: I7c0b912dabdd1b7d7d44437e4ade5e5994994796 GitHub-Last-Rev: 9fae6970f0f3b32a24893ef32fc4b38fa5a2a96d GitHub-Pull-Request: golang/go#64640 Reviewed-on: https://go-review.googlesource.com/c/go/+/548715 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
parent
0ac1e3b245
commit
c2079deb24
@ -7,11 +7,14 @@
|
||||
package sanitizers_test
|
||||
|
||||
import (
|
||||
"internal/testenv"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLibFuzzer(t *testing.T) {
|
||||
testenv.MustHaveGoBuild(t)
|
||||
testenv.MustHaveCGO(t)
|
||||
goos, err := goEnv("GOOS")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
@ -8,11 +8,14 @@ package sanitizers_test
|
||||
|
||||
import (
|
||||
"internal/platform"
|
||||
"internal/testenv"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMSAN(t *testing.T) {
|
||||
testenv.MustHaveGoBuild(t)
|
||||
testenv.MustHaveCGO(t)
|
||||
goos, err := goEnv("GOOS")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user