Mercurial > hg
view tests/test-strip-cross.t @ 36037:8de90e006c78
run-tests: report tests that exception occurred in
We now record the test that an exception occurred in. We put this
information to use by aggregating the count of failures in each
test. For each exception, the exception report now prints the total
number of tests having that exception and the test with the least
number of exceptions exhibiting that failure. The exception list
is now sorted by (total count, tests impacted, count of failures
in least failing test).
This allows us to:
* Assess how widespread a failure is. Some exceptions occur a lot
in a few tests. Others occur over many tests.
* Easily run a test exhibiting an exception without having to find
a failure in test output.
* Find and fix low hanging fruit (e.g. exceptions that are the
only failure in a test).
Here's an example of the new output:
199 (4 tests) /home/gps/src/hg/hgext/blackbox.py:191: %b requires a bytes-like object, or an object that implements __bytes__, not 'str' (test-devel-warnings.t - 1 total)
142 (19 tests) /home/gps/src/hg/hgext/mq.py:655: list indices must be integers or slices, not bytes (test-hardlinks.t - 1 total)
140 (20 tests) /home/gps/src/hg/mercurial/patch.py:296: string argument expected, got 'bytes' (test-audit-subrepo.t - 1 total)
101 (15 tests) /home/gps/src/hg/hgext/convert/convcmd.py:60: encode() argument 1 must be str, not bytes (test-convert-clonebranches.t - 1 total)
90 (2 tests) /home/gps/src/hg/hgext/mq.py:456: can't concat str to bytes (test-mq-qqueue.t - 1 total)
87 (2 tests) /home/gps/src/hg/mercurial/branchmap.py:380: %b requires a bytes-like object, or an object that implements __bytes__, not 'FileNotFoundError' (test-branches.t - 2 total)
85 (22 tests) /home/gps/src/hg/mercurial/sshpeer.py:223: cannot convert 'UUID' object to bytes (test-bundle2-pushback.t - 1 total)
1 (1 tests) /home/gps/src/hg/mercurial/formatter.py:254: %b requires a bytes-like object, or an object that implements __bytes__, not 'str' (test-debugextensions.t - 2 total)
1 (1 tests) /home/gps/src/hg/hgext/convert/convcmd.py:420: startswith first arg must be str or a tuple of str, not bytes (test-convert-authormap.t - 2 total)
1 (1 tests) /home/gps/src/hg/mercurial/revlog.py:797: '>=' not supported between instances of 'NoneType' and 'int' (test-unionrepo.t - 1 total)
1 (1 tests) /home/gps/src/hg/hgext/show.py:129: %b requires a bytes-like object, or an object that implements __bytes__, not 'str' (test-show.t - 1 total)
Differential Revision: https://phab.mercurial-scm.org/D2138
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 11 Feb 2018 12:42:10 -0800 |
parents | aa9385f983fa |
children | 009d0283de5f |
line wrap: on
line source
test stripping of filelogs where the linkrev doesn't always increase $ echo '[extensions]' >> $HGRCPATH $ echo 'strip =' >> $HGRCPATH $ hg init orig $ cd orig $ commit() > { > hg up -qC null > count=1 > for i in "$@"; do > for f in $i; do > echo $count > $f > done > count=`expr $count + 1` > done > hg commit -qAm "$*" > } 2 1 0 2 0 1 2 $ commit '201 210' $ commit '102 120' '210' $ commit '021' $ commit '201' '021 120' $ commit '012 021' '102 201' '120 210' $ commit 'manifest-file' $ commit '102 120' '012 210' '021 201' $ commit '201 210' '021 120' '012 102' $ HGUSER=another-user; export HGUSER $ commit 'manifest-file' $ commit '012' 'manifest-file' $ cd .. $ hg clone -q -U -r -1 -r -2 -r -3 -r -4 -r -6 orig crossed $ cd crossed $ hg debugindex --manifest rev offset length ..... linkrev nodeid p1 p2 (re) 0 0 112 ..... 0 6f105cbb914d 000000000000 000000000000 (re) 1 112 56 ..... 3 1b55917b3699 000000000000 000000000000 (re) 2 168 123 ..... 1 8f3d04e263e5 000000000000 000000000000 (re) 3 291 122 ..... 2 f0ef8726ac4f 000000000000 000000000000 (re) 4 413 87 ..... 4 0b76e38b4070 000000000000 000000000000 (re) $ for i in 012 021 102 120 201 210 manifest-file; do > echo $i > hg debugindex $i > echo > done 012 rev offset length ..... linkrev nodeid p1 p2 (re) 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re) 1 3 3 ..... 1 5d9299349fc0 000000000000 000000000000 (re) 2 6 3 ..... 2 2661d26c6496 000000000000 000000000000 (re) 021 rev offset length ..... linkrev nodeid p1 p2 (re) 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re) 1 3 3 ..... 2 5d9299349fc0 000000000000 000000000000 (re) 2 6 3 ..... 1 2661d26c6496 000000000000 000000000000 (re) 102 rev offset length ..... linkrev nodeid p1 p2 (re) 0 0 3 ..... 1 b8e02f643373 000000000000 000000000000 (re) 1 3 3 ..... 0 5d9299349fc0 000000000000 000000000000 (re) 2 6 3 ..... 2 2661d26c6496 000000000000 000000000000 (re) 120 rev offset length ..... linkrev nodeid p1 p2 (re) 0 0 3 ..... 1 b8e02f643373 000000000000 000000000000 (re) 1 3 3 ..... 2 5d9299349fc0 000000000000 000000000000 (re) 2 6 3 ..... 0 2661d26c6496 000000000000 000000000000 (re) 201 rev offset length ..... linkrev nodeid p1 p2 (re) 0 0 3 ..... 2 b8e02f643373 000000000000 000000000000 (re) 1 3 3 ..... 0 5d9299349fc0 000000000000 000000000000 (re) 2 6 3 ..... 1 2661d26c6496 000000000000 000000000000 (re) 210 rev offset length ..... linkrev nodeid p1 p2 (re) 0 0 3 ..... 2 b8e02f643373 000000000000 000000000000 (re) 1 3 3 ..... 1 5d9299349fc0 000000000000 000000000000 (re) 2 6 3 ..... 0 2661d26c6496 000000000000 000000000000 (re) manifest-file rev offset length ..... linkrev nodeid p1 p2 (re) 0 0 3 ..... 3 b8e02f643373 000000000000 000000000000 (re) 1 3 3 ..... 4 5d9299349fc0 000000000000 000000000000 (re) $ cd .. $ for i in 0 1 2 3 4; do > hg clone -q -U --pull crossed $i > echo "% Trying to strip revision $i" > hg --cwd $i strip $i > echo "% Verifying" > hg --cwd $i verify > echo > done % Trying to strip revision 0 saved backup bundle to $TESTTMP/0/.hg/strip-backup/*-backup.hg (glob) % Verifying checking changesets checking manifests crosschecking files in changesets and manifests checking files 7 files, 4 changesets, 15 total revisions % Trying to strip revision 1 saved backup bundle to $TESTTMP/1/.hg/strip-backup/*-backup.hg (glob) % Verifying checking changesets checking manifests crosschecking files in changesets and manifests checking files 7 files, 4 changesets, 14 total revisions % Trying to strip revision 2 saved backup bundle to $TESTTMP/2/.hg/strip-backup/*-backup.hg (glob) % Verifying checking changesets checking manifests crosschecking files in changesets and manifests checking files 7 files, 4 changesets, 14 total revisions % Trying to strip revision 3 saved backup bundle to $TESTTMP/3/.hg/strip-backup/*-backup.hg (glob) % Verifying checking changesets checking manifests crosschecking files in changesets and manifests checking files 7 files, 4 changesets, 19 total revisions % Trying to strip revision 4 saved backup bundle to $TESTTMP/4/.hg/strip-backup/*-backup.hg (glob) % Verifying checking changesets checking manifests crosschecking files in changesets and manifests checking files 7 files, 4 changesets, 19 total revisions