2018-05-07 18:27:06 +00:00
|
|
|
// 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)
|
2018-05-07 18:27:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|