changeset 33337:de324547c751

tests: stabilize on Windows I'm not sure if the difference on Windows for test-sparse.t is expected or not. It looks like unless the leading '/' is followed by a drive letter, '/' is resolved to 'C:/MinGW/msys/1.0'. But both cases abort with "not under root" instead of just warning.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 08 Jul 2017 14:10:10 -0400
parents 4672db164c98
children ad124b3208fd
files tests/test-rebase-scenario-global.t tests/test-sparse-profiles.t tests/test-sparse.t
diffstat 3 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebase-scenario-global.t	Sat Jun 24 15:29:42 2017 -0700
+++ b/tests/test-rebase-scenario-global.t	Sat Jul 08 14:10:10 2017 -0400
@@ -773,7 +773,7 @@
   $ hg rebase -b . -d 1 --traceback
   rebasing 2:779a07b1b7a0 "first source commit"
   rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip)
-  saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-backup.hg (glob)
+  saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-rebase.hg (glob)
 #endif
 
 Get back to the root of cwd-vanish. Note that even though `cd ..`
--- a/tests/test-sparse-profiles.t	Sat Jun 24 15:29:42 2017 -0700
+++ b/tests/test-sparse-profiles.t	Sat Jul 08 14:10:10 2017 -0400
@@ -246,6 +246,8 @@
 
   $ cd ..
 
+#if unix-permissions
+
 Test file permissions changing across a sparse profile change
   $ hg init sparseperm
   $ cd sparseperm
@@ -270,3 +272,4 @@
   $ ls -l b
   -rwxr-xr-x* b (glob)
 
+#endif
--- a/tests/test-sparse.t	Sat Jun 24 15:29:42 2017 -0700
+++ b/tests/test-sparse.t	Sat Jul 08 14:10:10 2017 -0400
@@ -27,12 +27,24 @@
 
 Absolute paths outside the repo should just be rejected
 
+#if no-windows
   $ hg debugsparse --include /foo/bar
   warning: paths cannot start with /, ignoring: ['/foo/bar']
   $ hg debugsparse --include '$TESTTMP/myrepo/hide'
 
   $ hg debugsparse --include '/root'
   warning: paths cannot start with /, ignoring: ['/root']
+#else
+TODO: See if this can be made to fail the same way as on Unix
+  $ hg debugsparse --include /c/foo/bar
+  abort: c:/foo/bar not under root '$TESTTMP/myrepo' (glob)
+  [255]
+  $ hg debugsparse --include '$TESTTMP/myrepo/hide'
+
+  $ hg debugsparse --include '/c/root'
+  abort: c:/root not under root '$TESTTMP/myrepo' (glob)
+  [255]
+#endif
 
 Verify commiting while sparse includes other files