Mercurial > hg
comparison tests/test-chg.t @ 48275:1ea289e34c70 stable
tests: better determinism in test-chg.t
chg tests fail pretty often with "Sample count: *" line disappearing.
It disappears because the sample count is zero, in which case a custom message is printed.
This commit makes the test succeed in that case.
Differential Revision: https://phab.mercurial-scm.org/D11716
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Wed, 20 Oct 2021 18:44:26 +0100 |
parents | 8fcc0a829f3d |
children | 96aa3a68d3b5 |
comparison
equal
deleted
inserted
replaced
48273:3a95a4e660b9 | 48275:1ea289e34c70 |
---|---|
473 share the same server | 473 share the same server |
474 $ cp $HGRCPATH.orig $HGRCPATH | 474 $ cp $HGRCPATH.orig $HGRCPATH |
475 $ hg init $TESTTMP/profiling | 475 $ hg init $TESTTMP/profiling |
476 $ cd $TESTTMP/profiling | 476 $ cd $TESTTMP/profiling |
477 $ filteredchg() { | 477 $ filteredchg() { |
478 > CHGDEBUG=1 chg "$@" 2>&1 | egrep 'Sample count|start cmdserver' || true | 478 > CHGDEBUG=1 chg "$@" 2>&1 | sed -rn 's_^No samples recorded.*$_Sample count: 0_; /Sample count/p; /start cmdserver/p' |
479 > } | 479 > } |
480 $ newchg() { | 480 $ newchg() { |
481 > chg --kill-chg-daemon | 481 > chg --kill-chg-daemon |
482 > filteredchg "$@" | egrep -v 'start cmdserver' || true | 482 > filteredchg "$@" | egrep -v 'start cmdserver' || true |
483 > } | 483 > } |