diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2021-07-29 15:49:05 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2021-07-29 16:48:48 +0200 |
| commit | 8a7994108262ea6c47a3e3e3602732d26ded88e7 (patch) | |
| tree | dee03df2532c31d04580e03669b919802da6bbf8 /pkg | |
| parent | b44001ce341058eacf27ece52df7cf35ca8b2f5a (diff) | |
pkg/csource: don't enable HandleSegv in short tests
HandleSegv can radically increase compilation time/memory consumption on large programs.
For example, for one program captured from this test enabling HandleSegv increases
compilation time from 1.94s to 104.73s and memory consumption from 136MB to 8116MB.
This leads to CI failures on #2688.
Don't enable HandleSegv in short tests.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/csource/csource_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go index e2035b286..9e6fd1a59 100644 --- a/pkg/csource/csource_test.go +++ b/pkg/csource/csource_test.go @@ -71,6 +71,12 @@ func testTarget(t *testing.T, target *prog.Target, full bool) { opts = allOptionsPermutations(target.OS) } for opti, opts := range opts { + if testing.Short() && opts.HandleSegv { + // HandleSegv can radically increase compilation time/memory consumption on large programs. + // For example, for one program captured from this test enabling HandleSegv increases + // compilation time from 1.94s to 104.73s and memory consumption from 136MB to 8116MB. + continue + } opts := opts t.Run(fmt.Sprintf("%v", opti), func(t *testing.T) { t.Parallel() |
