Skip to content

Commit

Permalink
cmd/cgo/internal/testsanitizers: check for go build and cgo in fuzzer…
Browse files Browse the repository at this point in the history
… and msan tests

Check if the platform can compile programs and has cgo support as a
requirement to run the fuzzer and msan tests.

Fixes [reserved]
  • Loading branch information
mauri870 committed Dec 11, 2023
1 parent 46ea4ab commit 9fae697
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cmd/cgo/internal/testsanitizers/libfuzzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/cmd/cgo/internal/testsanitizers/msan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9fae697

Please sign in to comment.