diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-05-16 16:16:36 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-05-18 11:34:42 +0200 |
| commit | b6fa239fd5e9e120ac2b8e9f3d7f608125a7f986 (patch) | |
| tree | cf2bd7c58004da4db974893f1c2c6cd418664127 /pkg/csource/csource_test.go | |
| parent | 04875dc64477a3d369d8a125d0752bf4fb06bfef (diff) | |
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.
Diffstat (limited to 'pkg/csource/csource_test.go')
| -rw-r--r-- | pkg/csource/csource_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
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) |
