Patchwork tests: stabilize ssh tests on Windows

login
register
mail settings
Submitter Matt Harbison
Date Feb. 8, 2018, 5:04 a.m.
Message ID <620577fa68a7c6cd6b47.1518066259@Envy>
Download mbox | patch
Permalink /patch/27476/
State Accepted
Headers show

Comments

Matt Harbison - Feb. 8, 2018, 5:04 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1518064968 18000
#      Wed Feb 07 23:42:48 2018 -0500
# Node ID 620577fa68a7c6cd6b473c72af9108303bc23167
# Parent  258a474c5f1ba7e9d61f15c5d8f548f5e01e4f95
tests: stabilize ssh tests on Windows

This seems like a somewhat common type of failure (double vs single quote), so
I'm interested in ideas about how to avoid this.  I doubt that we should
automatically fall back from single quote to double quote, like with '/' vs '\'.
Yuya Nishihara - Feb. 8, 2018, 11:52 a.m.
On Thu, 08 Feb 2018 00:04:19 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1518064968 18000
> #      Wed Feb 07 23:42:48 2018 -0500
> # Node ID 620577fa68a7c6cd6b473c72af9108303bc23167
> # Parent  258a474c5f1ba7e9d61f15c5d8f548f5e01e4f95
> tests: stabilize ssh tests on Windows

Queued, thanks.

> This seems like a somewhat common type of failure (double vs single quote), so
> I'm interested in ideas about how to avoid this.  I doubt that we should
> automatically fall back from single quote to double quote, like with '/' vs '\'.

-1 for translating single/double quotes automatically by default. The difference
is sometimes important.

Patch

diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t
--- a/tests/test-debugcommands.t
+++ b/tests/test-debugcommands.t
@@ -390,7 +390,8 @@ 
   pushable: yes
 
   $ hg --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" --debug debugpeer ssh://user@dummy/debugrevlog
-  running "*" "*/tests/dummyssh" 'user@dummy' 'hg -R debugrevlog serve --stdio' (glob)
+  running "*" "*/tests/dummyssh" 'user@dummy' 'hg -R debugrevlog serve --stdio' (glob) (no-windows !)
+  running "*" "*\tests/dummyssh" "user@dummy" "hg -R debugrevlog serve --stdio" (glob) (windows !)
   devel-peer-request: hello
   sending hello command
   devel-peer-request: between
diff --git a/tests/test-ssh-proto.t b/tests/test-ssh-proto.t
--- a/tests/test-ssh-proto.t
+++ b/tests/test-ssh-proto.t
@@ -17,7 +17,8 @@ 
 Test a normal behaving server, for sanity
 
   $ hg --debug debugpeer ssh://user@dummy/server
-  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob)
+  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !)
+  running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !)
   devel-peer-request: hello
   sending hello command
   devel-peer-request: between
@@ -63,7 +64,8 @@ 
 --debug will print the banner
 
   $ SSHSERVERMODE=banner hg --debug debugpeer ssh://user@dummy/server
-  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob)
+  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !)
+  running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !)
   devel-peer-request: hello
   sending hello command
   devel-peer-request: between
@@ -114,7 +116,8 @@ 
 servers.
 
   $ SSHSERVERMODE=no-hello hg --debug debugpeer ssh://user@dummy/server
-  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob)
+  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !)
+  running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !)
   devel-peer-request: hello
   sending hello command
   devel-peer-request: between
@@ -141,7 +144,8 @@ 
   
 
   $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-no-args --debug debugpeer ssh://user@dummy/server
-  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob)
+  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !)
+  running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !)
   sending no-args command
   devel-peer-request: hello
   sending hello command
@@ -176,7 +180,8 @@ 
   
 
   $ hg --config sshpeer.mode=extra-handshake-commands --config sshpeer.handshake-mode=pre-multiple-no-args --debug debugpeer ssh://user@dummy/server
-  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob)
+  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !)
+  running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !)
   sending unknown1 command
   sending unknown2 command
   sending unknown3 command
@@ -405,7 +410,8 @@ 
   
 
   $ hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server
-  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob)
+  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !)
+  running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !)
   sending upgrade request: * proto=exp-ssh-v2-0001 (glob)
   devel-peer-request: hello
   sending hello command
@@ -434,7 +440,8 @@ 
   capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
 
   $ SSHSERVERMODE=upgradev2 hg --config experimental.sshpeer.advertise-v2=true --debug debugpeer ssh://user@dummy/server
-  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob)
+  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !)
+  running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !)
   sending upgrade request: * proto=exp-ssh-v2-0001 (glob)
   devel-peer-request: hello
   sending hello command
@@ -449,7 +456,8 @@ 
 Verify the peer has capabilities
 
   $ SSHSERVERMODE=upgradev2 hg --config experimental.sshpeer.advertise-v2=true --debug debugcapabilities ssh://user@dummy/server
-  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob)
+  running * "*/tests/dummyssh" 'user@dummy' 'hg -R server serve --stdio' (glob) (no-windows !)
+  running * "*\tests/dummyssh" "user@dummy" "hg -R server serve --stdio" (glob) (windows !)
   sending upgrade request: * proto=exp-ssh-v2-0001 (glob)
   devel-peer-request: hello
   sending hello command