aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-05-07 19:24:46 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-05-07 19:24:46 +0200
commitbdff58b1a1c471bafaf6825bab7e7ff454dddfea (patch)
treedd523819442a2a0975cc37fcf8dacf63e1a2ecb6 /pkg
parent67f2e89e7380d3640dbff24a5797f537a40e8063 (diff)
pkg/csource: reduce test size
The test times out on travis: https://travis-ci.org/google/syzkaller/jobs/375965899 https://travis-ci.org/google/syzkaller/jobs/375965900
Diffstat (limited to 'pkg')
-rw-r--r--pkg/csource/csource_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go
index c90a5ff0a..ac085a1d5 100644
--- a/pkg/csource/csource_test.go
+++ b/pkg/csource/csource_test.go
@@ -82,7 +82,7 @@ func TestGenerateOptions(t *testing.T) {
allPermutations := allOptionsPermutations()
if testing.Short() {
r := rand.New(rs)
- for i := 0; i < 32; i++ {
+ for i := 0; i < 16; i++ {
permutations = append(permutations, allPermutations[r.Intn(len(allPermutations))])
}
} else {
@@ -93,9 +93,11 @@ func TestGenerateOptions(t *testing.T) {
t.Run(fmt.Sprintf("%v", i), func(t *testing.T) {
target, rs, iters := initTest(t)
t.Logf("opts: %+v", opts)
- for i := 0; i < iters; i++ {
- p := target.Generate(rs, 10, nil)
- testOne(t, p, opts)
+ if !testing.Short() {
+ for i := 0; i < iters; i++ {
+ p := target.Generate(rs, 10, nil)
+ testOne(t, p, opts)
+ }
}
testOne(t, syzProg, opts)
})