changeset 19082:63dda3c3bb11 stable

blackbox: don't run permission tests on non-unix systems The windows and vfat test runs were failing due to read/write permissions not working the same on those systems. On vfat, permissions can't be changed at all, and on windows it seems the chmod emulation doesn't remove read permissions. We could theoretically get the 'cannot write to blacklog.log' test to pass on windows but there's no #if condition to let us exclude vfat only. Verified that test-blackbox passes on windows now.
author Durham Goode <durham@fb.com>
date Mon, 22 Apr 2013 18:00:59 -0700
parents e97ce4a5afc5
children 12f15e4b2ca0
files tests/test-blackbox.t
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-blackbox.t	Mon Apr 22 16:50:08 2013 -0500
+++ b/tests/test-blackbox.t	Mon Apr 22 18:00:59 2013 -0700
@@ -64,6 +64,8 @@
 
   $ hg rollback
   repository tip rolled back to revision 1 (undo pull)
+
+#if unix-permissions
   $ chmod 000 .hg/blackbox.log
   $ hg --debug incoming
   warning: cannot write to blackbox.log: Permission denied
@@ -85,6 +87,7 @@
   c
   
   
+#endif
   $ hg pull
   pulling from $TESTTMP/blackboxtest (glob)
   searching for changes
@@ -95,12 +98,13 @@
   (run 'hg update' to get a working copy)
 
 a failure reading from the log is fine
-
+#if unix-permissions
   $ hg blackbox -l 3
   abort: Permission denied: $TESTTMP/blackboxtest2/.hg/blackbox.log
   [255]
 
   $ chmod 600 .hg/blackbox.log
+#endif
 
 backup bundles get logged