Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 12:45:44 -0700] rev 21435
run-tests: rename Test._test to Test.name
A lot of the attributes in Test could probably be renamed. This one is
needed for an upcoming patch.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 12:19:48 -0700] rev 21434
run-tests: teach Test instances whether they are in unittest mode
Tests executing in unittest mode behave a little differently. For
example, they report their results to a TestResult rather than just
printing. This patch paves the way for better integration of Test into
the unittest framework.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 11:55:02 -0700] rev 21433
run-tests: teach unittest about warned results
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 11:52:41 -0700] rev 21432
run-tests: document how success code is handled
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 11:51:11 -0700] rev 21431
run-tests: teach unittest about ignored tests
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 11:48:19 -0700] rev 21430
run-tests: teach unittest about skipped tests
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 11:47:40 -0700] rev 21429
run-tests: define custom result and runner classes for unittest
We need to teach unittest about some custom result types. This will
require some custom classes. This patch creates a skeleton for them.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 11:29:39 -0700] rev 21428
run-tests: start to report test results against TestResult
Previously, our unittest wrapper didn't report results properly. We now
properly report failures.
We had to rename the local variable to prevent "t" from being
overwritten in the local scope.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 11:24:37 -0700] rev 21427
run-tests: give unittest wrapper a short description
This will make the output contain something useful rather than the
default repr() for the class.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Apr 2014 11:22:08 -0700] rev 21426
run-tests: initial support for running tests with unittest
The unittest package in Python's standard library provides an almost
universal mechanism for defining and running tests. This patch starts
the process of making run-tests.py talk to it.
The main benefit of speaking unittest is that this will enable
Mercurial's tests to be more easily consumed by other testing tools,
like nose. This is useful for 3rd party extensions having their own
test infrastructure, for example.
Running tests in unittest mode will not result in completely sane
behavior until the unittest mode is made the default execution mode.
Expect things like double printing of output until support stabilizes.
Sean Farley <sean.michael.farley@gmail.com> [Wed, 16 Apr 2014 16:34:48 -0500] rev 21425
localrepo: reverse contexts in status
This is a slight tweak to how localrepo.status calculates what files have
changed. By forcing a changectx to be first operator and anything not a
changectx to be the second operator, we can later exploit this to allow
refactoring the status operation as a method of a context object.
Furthermore, this change will speed up 'hg diff --reverse' when used with the
working directory because the code will now hit a fast path without needing to
calculate an unneeded second manifest.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 16 May 2014 13:18:57 -0700] rev 21424
test: split test-largefile.t in multiple file
The `test-largefiles.t` unified test is significantly longer (about 30%) than
any other tests in the mercurial test suite. As a result, its is alway the last
test my test runner is waiting for at the end of a run.
In practice, this means that `test-largefile.t` is wasting half a minute of my
life every times I'm running the mercurial test suites. This probably mean more
a few cumulated day by now.
I've finally decided to split it up in multiple smaller tests to bring it back in
reasonable length.
This changeset extracts independent test cases in two files. One dedicated to
wire protocole testing, and another one dedicated to all other tests that could
be independently extracted.
No test case were haltered in the making of this changeset.
Various timing available below. All timing have been done on a with 90 jobs on a
64 cores machine. Similar result are shown on firefly (20 jobs on 12 core).
General timing of the whole run
--------------------------------
We see a 25% real time improvement for no significant cpu time impact.
Before split:
real 2m1.149s
user 58m4.662s
sys 11m28.563s
After split:
real 1m31.977s
user 57m45.993s
sys 11m33.634s
Last test to finish (using run-test.py --time)
----------------------------------------------
test-largefile.t is now finishing at the same time than other slow tests.
Before split:
Time Test
119.280 test-largefiles.t
93.995 test-mq.t
89.897 test-subrepo.t
86.920 test-glog.t
85.508 test-rename-merge2.t
83.594 test-revset.t
79.824 test-keyword.t
78.077 test-mq-header-date.t
After split:
Time Test
90.414 test-mq.t
88.594 test-largefiles.t
85.363 test-subrepo.t
81.059 test-glog.t
78.927 test-rename-merge2.t
78.021 test-revset.t
77.777 test-command-template.t
Timing of largefile test themself
-----------------------------------
Running only tests prefixed with "test-largefiles".
No significant change in cumulated time.
Before:
Time Test
58.673 test-largefiles.t
2.931 test-largefiles-cache.t
0.583 test-largefiles-small-disk.t
After:
Time Test
31.754 test-largefiles.t
17.460 test-largefiles-misc.t
8.888 test-largefiles-wireproto.t
2.864 test-largefiles-cache.t
0.580 test-largefiles-small-disk.t