Commit 26222ddc authored by Russ Cox's avatar Russ Cox

cmd/go: skip long tests in -short mode

I marked every test that takes more than 0.5 seconds on my machine
as something to run only when not in -short mode, or in -short mode
on the beefy linux/amd64, windows/amd64, and darwin/amd64 builders.

I also shortened a few needlessly-expensive tests where possible.

Cuts the time for go test -short cmd/go from 45s to 15s on my machine.
Should help even more on some of our builders and slower user machines.

Fixes #23287.

Change-Id: I0e36003ef947b0ebe4224a1373731f9fa9216843
Reviewed-on: https://go-review.googlesource.com/86252
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent fcdcb194
This diff is collapsed.
......@@ -148,6 +148,7 @@ func splitLines(s string) []string {
}
func TestVendorGet(t *testing.T) {
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
tg.tempFile("src/v/m.go", `
......@@ -173,8 +174,8 @@ func TestVendorGet(t *testing.T) {
tg.grepStdout("v/vendor/vendor.org/p", "import not in vendor directory")
tg.run("list", "-f", "{{.TestImports}}")
tg.grepStdout("v/vendor/vendor.org/p", "test import not in vendor directory")
tg.run("get")
tg.run("get", "-t")
tg.run("get", "-d")
tg.run("get", "-t", "-d")
}
func TestVendorGetUpdate(t *testing.T) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment