Browse Source

go.crypto/ssh/test: Run sshd with -e, so the debug output goes onto stderr.

R=dave, agl
CC=golang-dev
https://golang.org/cl/10230043
Han-Wen Nienhuys 12 years ago
parent
commit
b9b3892677
1 changed files with 5 additions and 2 deletions
  1. 5 2
      ssh/test/test_unix_test.go

+ 5 - 2
ssh/test/test_unix_test.go

@@ -56,7 +56,6 @@ HostbasedAuthentication no
 
 var (
 	configTmpl template.Template
-	sshd       string // path to sshd
 	rsakey     *rsa.PrivateKey
 )
 
@@ -103,7 +102,11 @@ func clientConfig() *ssh.ClientConfig {
 }
 
 func (s *server) Dial(config *ssh.ClientConfig) *ssh.ClientConn {
-	s.cmd = exec.Command("sshd", "-f", s.configfile, "-i")
+	sshd, err := exec.LookPath("sshd")
+	if err != nil {
+		s.t.Skipf("skipping test: %v", err)
+	}
+	s.cmd = exec.Command(sshd, "-f", s.configfile, "-i", "-e")
 	r1, w1, err := os.Pipe()
 	if err != nil {
 		s.t.Fatal(err)