tests: make output lines conditional for testing with fsmonitor
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Mon, 03 Jul 2017 02:52:39 +0900
changeset 33213 0bec70c1df15
parent 33212 fe0667cc521e
child 33214 7367b76ef75c
tests: make output lines conditional for testing with fsmonitor Repository cloned-bookmark-default and tobundle exist in the working directory of main test repository "repo". We should take care for them, because it is known issue that fsmonitor can't handle nested repositories. These nested repositories are cloned from "repo", and the number of unknown files = files in these repositories (including files under .hg) will be changed easily in the future. But testing with fsmonitor is not ordinary. Therefore, test-bookmarks.t with fsmonitor might be broken silently. This is reason why this patch uses "(glob)" for the number of unknown files in "hg summary" output. BTW, this patch doesn't use .hgignore to make test portable, because .hgignore might cause another issue related to "walk_on_invalidate" configuration of fsmonitor.
tests/test-bookmarks.t
--- a/tests/test-bookmarks.t	Mon Jul 03 02:52:39 2017 +0900
+++ b/tests/test-bookmarks.t	Mon Jul 03 02:52:39 2017 +0900
@@ -589,12 +589,17 @@
 
 update to active bookmark if it's not the parent
 
+(it is known issue that fsmonitor can't handle nested repositories. In
+this test scenario, cloned-bookmark-default and tobundle exist in the
+working directory of current repository)
+
   $ hg summary
   parent: 2:db815d6d32e6 
    2
   branch: default
   bookmarks: *Z Y x  y
-  commit: 1 added, 1 unknown (new branch head)
+  commit: 1 added, 1 unknown (new branch head) (no-fsmonitor !)
+  commit: 1 added, * unknown (new branch head) (glob) (fsmonitor !)
   update: 2 new changesets (update)
   phases: 5 draft
   $ hg update
@@ -774,6 +779,10 @@
 
 no-op update doesn't deactivate bookmarks
 
+(it is known issue that fsmonitor can't handle nested repositories. In
+this test scenario, cloned-bookmark-default and tobundle exist in the
+working directory of current repository)
+
   $ hg bookmarks
    * four                      3:9ba5f110a0b3
      should-end-on-two         2:db815d6d32e6
@@ -786,7 +795,8 @@
    y
   branch: test
   bookmarks: *four
-  commit: 2 unknown (clean)
+  commit: 2 unknown (clean) (no-fsmonitor !)
+  commit: * unknown (clean) (glob) (fsmonitor !)
   update: (current)
   phases: 4 draft