From 5597911fbf26237b9d11a0f6293e4b52b2d9069c Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Thu, 18 May 2017 14:26:02 +0200 Subject: csource: use tmp dir only when necessary --- csource/csource_test.go | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'csource/csource_test.go') diff --git a/csource/csource_test.go b/csource/csource_test.go index 8ca7bb5ce..3e09a3019 100644 --- a/csource/csource_test.go +++ b/csource/csource_test.go @@ -35,18 +35,20 @@ func allOptionsPermutations() []Options { for _, opt.Procs = range []int{1, 4} { for _, opt.Sandbox = range []string{"none", "setuid", "namespace"} { for _, opt.Repro = range []bool{false, true} { - for _, opt.EnableTun = range []bool{false, true} { - for _, opt.Fault = range []bool{false, true} { - if opt.Collide && !opt.Threaded { - continue + for _, opt.Fault = range []bool{false, true} { + for _, opt.EnableTun = range []bool{false, true} { + for _, opt.UseTmpDir = range []bool{false, true} { + if opt.Collide && !opt.Threaded { + continue + } + if !opt.Repeat && opt.Procs != 1 { + continue + } + if testing.Short() && opt.Procs != 1 { + continue + } + options = append(options, opt) } - if !opt.Repeat && opt.Procs != 1 { - continue - } - if testing.Short() && opt.Procs != 1 { - continue - } - options = append(options, opt) } } } -- cgit mrf-deployment