Debian Codegraph @

debian/patches/single-cpu.patch

raw
1 From: Santiago Vila <[email protected]>
2 Subject: Skip TestParallel on single-CPU systems
3 Bug-Debian: https://bugs.debian.org/1102313
4
5 --- a/td/t_struct_test.go
6 +++ b/td/t_struct_test.go
7 @@ -8,6 +8,7 @@
8
9 import (
10 "regexp"
11 + "runtime"
12 "strings"
13 "sync"
14 "testing"
15 @@ -136,6 +137,10 @@
16 // in parallel. We use a WaitGroup to make both subtests block
17 // until they're both ready. This test will block forever if
18 // the tests are not run together.
19 + if runtime.GOMAXPROCS(0) < 2 {
20 + tt.Skip("not enough CPUs to run parallel tests")
21 + }
22 +
23 var ready sync.WaitGroup
24 ready.Add(2)
25