From b6fa239fd5e9e120ac2b8e9f3d7f608125a7f986 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 16 May 2020 16:16:36 +0200 Subject: pkg/csource: speed up tests Tests run for too long. 1. Check only 1 arch per OS in short mode. 2. Dedup options. Turns out we generated 2x duplicates in allOptionsSingle. --- pkg/csource/csource_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkg/csource/csource_test.go') diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go index 61b6bcf31..a5b12babf 100644 --- a/pkg/csource/csource_test.go +++ b/pkg/csource/csource_test.go @@ -32,10 +32,13 @@ func TestGenerate(t *testing.T) { continue } t.Run(target.OS+"/"+target.Arch, func(t *testing.T) { + full := !checked[target.OS] + if !full && testing.Short() { + return + } if err := sysTarget.BrokenCompiler; err != "" { t.Skipf("target compiler is broken: %v", err) } - full := !checked[target.OS] checked[target.OS] = true t.Parallel() testTarget(t, target, full) -- cgit mrf-deployment