tests: avoid tests related to directory permission if running with fsmonitor
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Thu, 13 Jul 2017 03:17:59 +0900
changeset 33428 435f63d12475
parent 33427 1bdafe1111ce
child 33429 7a15cae3ec81
tests: avoid tests related to directory permission if running with fsmonitor
tests/blacklists/fsmonitor
tests/test-permissions.t
tests/test-tags.t
--- a/tests/blacklists/fsmonitor	Thu Jul 13 03:17:58 2017 +0900
+++ b/tests/blacklists/fsmonitor	Thu Jul 13 03:17:59 2017 +0900
@@ -23,9 +23,7 @@
 test-largefiles.t
 test-lfconvert.t
 test-nested-repo.t
-test-permissions.t
 test-push-warn.t
 test-subrepo-deep-nested-change.t
 test-subrepo-recursion.t
 test-subrepo.t
-test-tags.t
--- a/tests/test-permissions.t	Thu Jul 13 03:17:58 2017 +0900
+++ b/tests/test-permissions.t	Thu Jul 13 03:17:59 2017 +0900
@@ -61,10 +61,17 @@
   M a
   ? dir/a
   $ chmod -rx dir
+
+#if no-fsmonitor
+
+(fsmonitor makes "hg status" avoid accessing to "dir")
+
   $ hg status
   dir: Permission denied
   M a
 
+#endif
+
 Reenable perm to allow deletion:
 
   $ chmod +rx dir
--- a/tests/test-tags.t	Thu Jul 13 03:17:58 2017 +0900
+++ b/tests/test-tags.t	Thu Jul 13 03:17:59 2017 +0900
@@ -118,13 +118,17 @@
 
 And again, but now unable to write tag cache or lock file:
 
-#if unix-permissions
+#if unix-permissions no-fsmonitor
+
   $ rm -f .hg/cache/tags2-visible .hg/cache/hgtagsfnodes1
   $ chmod 555 .hg/cache
   $ hg identify
   b9154636be93 tip
   $ chmod 755 .hg/cache
 
+(this block should be protected by no-fsmonitor, because "chmod 555 .hg"
+makes watchman fail at accessing to files under .hg)
+
   $ chmod 555 .hg
   $ hg identify
   b9154636be93 tip