)
func TestLibFuzzer(t *testing.T) {
+ // Skip tests in short mode.
+ if testing.Short() {
+ t.Skip("libfuzzer tests can take upwards of minutes to run; skipping in short mode")
+ }
testenv.MustHaveGoBuild(t)
testenv.MustHaveCGO(t)
+
goos, err := goEnv("GOOS")
if err != nil {
t.Fatal(err)
goSrc string
cSrc string
expectedError string
- short bool
}{
- {goSrc: "libfuzzer1.go", expectedError: "panic: found it", short: true},
+ {goSrc: "libfuzzer1.go", expectedError: "panic: found it"},
{goSrc: "libfuzzer2.go", cSrc: "libfuzzer2.c", expectedError: "panic: found it"},
}
for _, tc := range cases {
t.Run(name, func(t *testing.T) {
t.Parallel()
- // Skip long-running tests in short mode.
- if testing.Short() && !tc.short {
- t.Skipf("%s can take upwards of minutes to run; skipping in short mode", name)
- }
-
dir := newTempDir(t)
defer dir.RemoveAll(t)