(tags []string, pkgs ...string)
| 384 | } |
| 385 | |
| 386 | func 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 | |
| 413 | func bench(tags []string, pkgs ...string) { |
| 414 | lazyRebuildAssets() |
no test coverage detected