Mercurial > hg
annotate tests/test-mac-packages.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 | 283a7da602ae |
children | 8d7eaff92f9c |
rev | line source |
---|---|
29027
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
1 #require test-repo slow osx osxpackaging |
29219
3c9066ed557c
tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents:
29027
diff
changeset
|
2 |
3c9066ed557c
tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents:
29027
diff
changeset
|
3 $ . "$TESTDIR/helpers-testrepo.sh" |
33204
ddd65b4f3ae6
tests: alias syshg and syshgenv so they can be switched conditionally
Yuya Nishihara <yuya@tcha.org>
parents:
33116
diff
changeset
|
4 $ testrepohgenv |
29219
3c9066ed557c
tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents:
29027
diff
changeset
|
5 |
31610
6dc8caccef8a
osx: use more paranoid quoting in test
Augie Fackler <augie@google.com>
parents:
31609
diff
changeset
|
6 $ OUTPUTDIR="`pwd`" |
29025
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
7 $ export OUTPUTDIR |
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
8 $ KEEPMPKG=yes |
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
9 $ export KEEPMPKG |
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 |
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
11 $ cd "$TESTDIR"/.. |
33594
283a7da602ae
osx: new script for generating OS X package versions
Augie Fackler <augie@google.com>
parents:
33593
diff
changeset
|
12 $ contrib/genosxversion.py --selftest ignoredarg |
31610
6dc8caccef8a
osx: use more paranoid quoting in test
Augie Fackler <augie@google.com>
parents:
31609
diff
changeset
|
13 $ make osx > "$OUTPUTDIR/build.log" 2>&1 |
6dc8caccef8a
osx: use more paranoid quoting in test
Augie Fackler <augie@google.com>
parents:
31609
diff
changeset
|
14 $ cd "$OUTPUTDIR" |
29027
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
15 $ ls -d *.pkg |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
16 Mercurial-*-macosx10.*.pkg (glob) |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
17 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
18 $ xar -xf Mercurial*.pkg |
29025
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
19 |
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
20 Gather list of all installed files: |
29027
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
21 $ lsbom mercurial.pkg/Bom > boms.txt |
29025
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
22 |
32575
197eb93560b3
osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents:
31610
diff
changeset
|
23 We've had problems with the filter logic in the past. Make sure no |
197eb93560b3
osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents:
31610
diff
changeset
|
24 .DS_Store files ended up in the final package: |
197eb93560b3
osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents:
31610
diff
changeset
|
25 $ grep DS_S boms.txt |
197eb93560b3
osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents:
31610
diff
changeset
|
26 [1] |
197eb93560b3
osx: override default exclude filter for pkgbuild
Augie Fackler <augie@google.com>
parents:
31610
diff
changeset
|
27 |
29025
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
28 Spot-check some randomly selected files: |
29027
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
29 $ grep bdiff boms.txt | cut -d ' ' -f 1,2,3 |
32470
0e93dc8c0f9f
osx: update Mac packaging tests for bdiff.so install location change
Augie Fackler <augie@google.com>
parents:
31610
diff
changeset
|
30 ./Library/Python/2.7/site-packages/mercurial/cext/bdiff.so 100755 0/0 |
33593
441a4550a80a
tests: update mac packaging test expectations
Augie Fackler <augie@google.com>
parents:
33204
diff
changeset
|
31 ./Library/Python/2.7/site-packages/mercurial/cffi/bdiff.py 100644 0/0 |
441a4550a80a
tests: update mac packaging test expectations
Augie Fackler <augie@google.com>
parents:
33204
diff
changeset
|
32 ./Library/Python/2.7/site-packages/mercurial/cffi/bdiff.pyc 100644 0/0 |
441a4550a80a
tests: update mac packaging test expectations
Augie Fackler <augie@google.com>
parents:
33204
diff
changeset
|
33 ./Library/Python/2.7/site-packages/mercurial/cffi/bdiff.pyo 100644 0/0 |
441a4550a80a
tests: update mac packaging test expectations
Augie Fackler <augie@google.com>
parents:
33204
diff
changeset
|
34 ./Library/Python/2.7/site-packages/mercurial/cffi/bdiffbuild.py 100644 0/0 |
441a4550a80a
tests: update mac packaging test expectations
Augie Fackler <augie@google.com>
parents:
33204
diff
changeset
|
35 ./Library/Python/2.7/site-packages/mercurial/cffi/bdiffbuild.pyc 100644 0/0 |
441a4550a80a
tests: update mac packaging test expectations
Augie Fackler <augie@google.com>
parents:
33204
diff
changeset
|
36 ./Library/Python/2.7/site-packages/mercurial/cffi/bdiffbuild.pyo 100644 0/0 |
29027
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
37 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.py 100644 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
38 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyc 100644 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
39 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyo 100644 0/0 |
32576
501d48bda912
zsh_completion: install as _hg not hg
Kyle Lippincott <spectral@google.com>
parents:
32575
diff
changeset
|
40 $ grep zsh/site-functions/_hg boms.txt | cut -d ' ' -f 1,2,3 |
501d48bda912
zsh_completion: install as _hg not hg
Kyle Lippincott <spectral@google.com>
parents:
32575
diff
changeset
|
41 ./usr/local/share/zsh/site-functions/_hg 100644 0/0 |
31142
408dcf7475a7
osx: install bash and zsh completions by default
Augie Fackler <augie@google.com>
parents:
29535
diff
changeset
|
42 $ grep hg-completion.bash boms.txt | cut -d ' ' -f 1,2,3 |
31609
8e516f71577a
osx: install completion scripts using install(1) to avoid umask badness
Augie Fackler <augie@google.com>
parents:
31142
diff
changeset
|
43 ./usr/local/hg/contrib/hg-completion.bash 100644 0/0 |
29027
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
44 $ egrep 'man[15]' boms.txt | cut -d ' ' -f 1,2,3 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
45 ./usr/local/share/man/man1 40755 0/0 |
32472
a38ed42cd23c
osx: include chg by default
Augie Fackler <augie@google.com>
parents:
32471
diff
changeset
|
46 ./usr/local/share/man/man1/chg.1 100644 0/0 |
29027
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
47 ./usr/local/share/man/man1/hg.1 100644 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
48 ./usr/local/share/man/man5 40755 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
49 ./usr/local/share/man/man5/hgignore.5 100644 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
50 ./usr/local/share/man/man5/hgrc.5 100644 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
51 $ grep bser boms.txt | cut -d ' ' -f 1,2,3 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
52 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/bser.so 100755 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
53 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.py 100644 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
54 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyc 100644 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
55 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyo 100644 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
56 $ grep localrepo boms.txt | cut -d ' ' -f 1,2,3 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
57 ./Library/Python/2.7/site-packages/mercurial/localrepo.py 100644 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
58 ./Library/Python/2.7/site-packages/mercurial/localrepo.pyc 100644 0/0 |
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
59 ./Library/Python/2.7/site-packages/mercurial/localrepo.pyo 100644 0/0 |
32472
a38ed42cd23c
osx: include chg by default
Augie Fackler <augie@google.com>
parents:
32471
diff
changeset
|
60 $ egrep 'bin/' boms.txt | cut -d ' ' -f 1,2,3 |
a38ed42cd23c
osx: include chg by default
Augie Fackler <augie@google.com>
parents:
32471
diff
changeset
|
61 ./usr/local/bin/chg 100755 0/0 |
29027
db5084d27df5
osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents:
29025
diff
changeset
|
62 ./usr/local/bin/hg 100755 0/0 |
29025
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
63 |
29535
da1848f07c6a
osx: explicitly build hg with /usr/bin/python2.7
Augie Fackler <augie@google.com>
parents:
29219
diff
changeset
|
64 Make sure the built binary uses the system Python interpreter |
da1848f07c6a
osx: explicitly build hg with /usr/bin/python2.7
Augie Fackler <augie@google.com>
parents:
29219
diff
changeset
|
65 $ bsdtar xf mercurial.pkg/Payload usr/local/bin |
da1848f07c6a
osx: explicitly build hg with /usr/bin/python2.7
Augie Fackler <augie@google.com>
parents:
29219
diff
changeset
|
66 Use a glob to find this to avoid check-code whining about a fixed path. |
da1848f07c6a
osx: explicitly build hg with /usr/bin/python2.7
Augie Fackler <augie@google.com>
parents:
29219
diff
changeset
|
67 $ head -n 1 usr/local/b?n/hg |
da1848f07c6a
osx: explicitly build hg with /usr/bin/python2.7
Augie Fackler <augie@google.com>
parents:
29219
diff
changeset
|
68 #!/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python |
da1848f07c6a
osx: explicitly build hg with /usr/bin/python2.7
Augie Fackler <augie@google.com>
parents:
29219
diff
changeset
|
69 |
29025
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
70 Note that we're not currently installing any /etc/mercurial stuff, |
f2549b0ba9ab
tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
71 including merge-tool configurations. |