Mercurial > hg-stable
changeset 47899: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 | 3a95a4e660b9 |
children | f3e218ae3fd9 |
files | tests/test-chg.t |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-chg.t Tue Oct 19 16:05:20 2021 +0200 +++ b/tests/test-chg.t Wed Oct 20 18:44:26 2021 +0100 @@ -475,7 +475,7 @@ $ hg init $TESTTMP/profiling $ cd $TESTTMP/profiling $ filteredchg() { - > CHGDEBUG=1 chg "$@" 2>&1 | egrep 'Sample count|start cmdserver' || true + > CHGDEBUG=1 chg "$@" 2>&1 | sed -rn 's_^No samples recorded.*$_Sample count: 0_; /Sample count/p; /start cmdserver/p' > } $ newchg() { > chg --kill-chg-daemon