Patchwork [2,of,7] tests: make output lines conditional for testing with fsmonitor

login
register
mail settings
Submitter Katsunori FUJIWARA
Date July 2, 2017, 5:53 p.m.
Message ID <474893a0ab43dd6ce085.1499017996@speaknoevil>
Download mbox | patch
Permalink /patch/21920/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - July 2, 2017, 5:53 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1499017959 -32400
#      Mon Jul 03 02:52:39 2017 +0900
# Node ID 474893a0ab43dd6ce0857587261e42adcc489435
# Parent  b756789234c89d1a381268f0840feb346fa052e0
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.

Patch

diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t
--- a/tests/test-bookmarks.t
+++ b/tests/test-bookmarks.t
@@ -589,12 +589,17 @@  create bundle with two heads
 
 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 @@  tipmost surviving ancestor of the stripp
 
 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 @@  no-op update doesn't deactivate bookmark
    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