Преглед изворни кода

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)