MCPcopy
hub / github.com/syncthing/syncthing / test

Function test

build.go:386–411  ·  view source on GitHub ↗
(tags []string, pkgs ...string)

Source from the content-addressed store, hash-verified

384}
385
386func test(tags []string, pkgs ...string) {
387 lazyRebuildAssets()
388
389 args := []string{"test", "-tags", strings.Join(tags, " ")}
390 if long {
391 timeout = longTimeout
392 } else {
393 args = append(args, "-short")
394 }
395 args = append(args, "-timeout", timeout)
396
397 if runtime.GOARCH == "amd64" {
398 switch runtime.GOOS {
399 case buildpkg.Darwin, buildpkg.Linux, buildpkg.FreeBSD: // , "windows": # See https://github.com/golang/go/issues/27089
400 args = append(args, "-race")
401 }
402 }
403
404 if coverage {
405 args = append(args, "-covermode", "atomic", "-coverprofile", "coverage.txt", "-coverpkg", strings.Join(pkgs, ","))
406 }
407
408 args = append(args, runArgs()...)
409
410 runPrint(goCmd, append(args, pkgs...)...)
411}
412
413func bench(tags []string, pkgs ...string) {
414 lazyRebuildAssets()

Callers 1

runCommandFunction · 0.70

Calls 3

lazyRebuildAssetsFunction · 0.85
runArgsFunction · 0.85
runPrintFunction · 0.85

Tested by

no test coverage detected