From bdff58b1a1c471bafaf6825bab7e7ff454dddfea Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 7 May 2018 19:24:46 +0200 Subject: 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 --- pkg/csource/csource_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pkg/csource/csource_test.go') 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) }) -- cgit mrf-deployment