Skip to content

Commit 29044e7

Browse files
committed
oops forgot ci.go
1 parent 0677626 commit 29044e7

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

build/ci.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,16 @@ func buildFlags(env build.Environment, staticLinking bool, buildTags []string) (
281281

282282
func doTest(cmdline []string) {
283283
var (
284-
dlgo = flag.Bool("dlgo", false, "Download Go and build with it")
285-
arch = flag.String("arch", "", "Run tests for given architecture")
286-
cc = flag.String("cc", "", "Sets C compiler binary")
287-
coverage = flag.Bool("coverage", false, "Whether to record code coverage")
288-
verbose = flag.Bool("v", false, "Whether to log verbosely")
289-
race = flag.Bool("race", false, "Execute the race detector")
290-
short = flag.Bool("short", false, "Pass the 'short'-flag to go test")
291-
cachedir = flag.String("cachedir", "./build/cache", "directory for caching downloads")
284+
dlgo = flag.Bool("dlgo", false, "Download Go and build with it")
285+
arch = flag.String("arch", "", "Run tests for given architecture")
286+
cc = flag.String("cc", "", "Sets C compiler binary")
287+
coverage = flag.Bool("coverage", false, "Whether to record code coverage")
288+
verbose = flag.Bool("v", false, "Whether to log verbosely")
289+
race = flag.Bool("race", false, "Execute the race detector")
290+
short = flag.Bool("short", false, "Pass the 'short'-flag to go test")
291+
cachedir = flag.String("cachedir", "./build/cache", "directory for caching downloads")
292292
skipspectests = flag.Bool("skip-spectests", false, "Skip downloading execution-spec-tests fixtures")
293+
threads = flag.Int("threads", 1, "Number of CPU threads to use for testing")
293294
)
294295
flag.CommandLine.Parse(cmdline)
295296

@@ -320,7 +321,7 @@ func doTest(cmdline []string) {
320321

321322
// Test a single package at a time. CI builders are slow
322323
// and some tests run into timeouts under load.
323-
gotest.Args = append(gotest.Args, "-p", "1")
324+
gotest.Args = append(gotest.Args, "-p", *threads)
324325
if *coverage {
325326
gotest.Args = append(gotest.Args, "-covermode=atomic", "-cover")
326327
}

0 commit comments

Comments
 (0)