Patchwork D12381: tests: fix glob pattern for dynamic timer alignment

login
register
mail settings
Submitter phabricator
Date March 17, 2022, 10:04 a.m.
Message ID <differential-rev-PHID-DREV-f6gbbtflqvc4nkznbgvq-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50725/
State New
Headers show

Comments

phabricator - March 17, 2022, 10:04 a.m.
pacien created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The number of space characters varies depending on the number of digits of the
  timer, making some tests fail on slow machines in an unintended way:
  
    diff
    --- /build/mercurial-6.1/tests/test-merge-halt.t
    +++ /build/mercurial-6.1/tests/test-merge-halt.t.err
    @@ -210,6 +210,6 @@
       merge halted after failed merge (see hg resolve)
       [240]
       $ hg shelve --list
    -  default         (* ago)    changes to: foo (glob)
    +  default         (11s ago)   changes to: foo
       $ hg unshelve --abort
       unshelve of 'default' aborted
    ERROR: test-merge-halt.t output changed

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12381

AFFECTED FILES
  tests/test-merge-halt.t
  tests/test-shelve.t

CHANGE DETAILS




To: pacien, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -976,7 +976,7 @@ 
 Test shelve --delete
 
   $ hg shelve --list
-  default         (*s ago)    changes to: create conflict (glob)
+  default         (*s ago) * changes to: create conflict (glob)
   $ hg shelve --delete doesnotexist
   abort: shelved change 'doesnotexist' not found
   [10]
@@ -1209,7 +1209,7 @@ 
   $ hg add e
   $ hg ci -m e
   $ hg shelve --patch
-  default         (*s ago)    changes to: b (glob)
+  default         (*s ago) * changes to: b (glob)
   
   diff --git a/c b/c
   new file mode 100644
@@ -1258,7 +1258,7 @@ 
   e
 -- shelve should not contain `c` now
   $ hg shelve --patch
-  default         (*s ago)    changes to: b (glob)
+  default         (*s ago) * changes to: b (glob)
   
   diff --git a/d b/d
   new file mode 100644
@@ -1357,7 +1357,7 @@ 
   A
   B
   $ hg shelve --patch
-  default         (*s ago)    changes to: add B to foo (glob)
+  default         (*s ago) * changes to: add B to foo (glob)
   
   diff --git a/foo b/foo
   --- a/foo
diff --git a/tests/test-merge-halt.t b/tests/test-merge-halt.t
--- a/tests/test-merge-halt.t
+++ b/tests/test-merge-halt.t
@@ -210,6 +210,6 @@ 
   merge halted after failed merge (see hg resolve)
   [240]
   $ hg shelve --list
-  default         (* ago)    changes to: foo (glob)
+  default         (*s ago) * changes to: foo (glob)
   $ hg unshelve --abort
   unshelve of 'default' aborted