浏览代码

go.crypto/ssh/test: skip tests during -short mode

This proposal effectively disables all the ssh/test tests when run with the -short flag supplied.

For developers and users of this package, there should be no change unless they are in the habbit of always supplying -short, which I belive is untrue.

For the CI dashboard the effect should be that these tests, which are really not portable enough to run reliably on all our various builders, are disabled.

LGTM=adg
R=adg, agl, hanwen
CC=golang-codereviews
https://golang.org/cl/125860043
Dave Cheney 11 年之前
父节点
当前提交
ed03dad8de
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      ssh/test/test_unix_test.go

+ 3 - 0
ssh/test/test_unix_test.go

@@ -224,6 +224,9 @@ func writeFile(path string, contents []byte) {
 
 // newServer returns a new mock ssh server.
 func newServer(t *testing.T) *server {
+	if testing.Short() {
+		t.Skip("skipping test due to -short")
+	}
 	dir, err := ioutil.TempDir("", "sshtest")
 	if err != nil {
 		t.Fatal(err)