syzkaller/pkg/csource/race_test.go

24 lines
532 B
Go
Raw Normal View History

// Copyright 2018 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
// +build race
package csource
import (
"fmt"
"os"
"strings"
)
func init() {
// csource tests consume too much memory under race detector (>1GB),
// and periodically timeout on Travis. So we skip them.
for _, arg := range os.Args[1:] {
if strings.Contains(arg, "-test.short") {
fmt.Printf("skipping race testing in short mode\n")
2018-05-07 18:40:44 +00:00
os.Exit(0)
}
}
}