mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Try not to crash the box with failing tests
This commit is contained in:
parent
7c604beb73
commit
c2daedbd11
2
build.go
2
build.go
@ -163,7 +163,7 @@ func setup() {
|
||||
}
|
||||
|
||||
func test(pkg string) {
|
||||
runPrint("godep", "go", "test", pkg)
|
||||
runPrint("godep", "go", "test", "-short", "-timeout", "10s", pkg)
|
||||
}
|
||||
|
||||
func install(pkg string) {
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
rdebug "runtime/debug"
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
@ -38,6 +39,13 @@ var correctIgnores = map[string][]string{
|
||||
".": {".*", "quux"},
|
||||
}
|
||||
|
||||
func init() {
|
||||
// This test runs the risk of entering infinite recursion if it fails.
|
||||
// Limit the stack size to 10 megs to creash early in that case instead of
|
||||
// potentially taking down the box...
|
||||
rdebug.SetMaxStack(10 * 1 << 20)
|
||||
}
|
||||
|
||||
func TestWalkSub(t *testing.T) {
|
||||
w := Walker{
|
||||
Dir: "testdata",
|
||||
|
Loading…
Reference in New Issue
Block a user