Sat, 28 Mar 2015 14:28:22 -0700 run-tests: separate newline normalization from replacements
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 14:28:22 -0700] rev 24510
run-tests: separate newline normalization from replacements Upcoming patches will change how the replacements system works to make it more flexible. To prepare for this, eliminate the one-off use of replacements to perform newline normalization on Windows.
Sat, 28 Mar 2015 14:12:57 -0700 run-tests: remove arguments from Test._runcommand
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 14:12:57 -0700] rev 24509
run-tests: remove arguments from Test._runcommand Now that runcommand is part of the Test class, arguments that were previously coming from Test attributes can now be switched to lookups inline.
Sat, 28 Mar 2015 14:08:25 -0700 run-tests: move run into Test class
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 14:08:25 -0700] rev 24508
run-tests: move run into Test class Future patches will change how replacements work. Since the logic in run() is strongly tied to the operation of individual tests and since there is potential to make the implementation simpler by giving the function access to Test attributes, move it into Test.
Sat, 28 Mar 2015 19:39:03 -0700 run-tests: wait for test threads after first error
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 19:39:03 -0700] rev 24507
run-tests: wait for test threads after first error The test runner has the ability to stop on first error. Tests are executed in new Python threads. The test runner starts new threads when it has capacity to do so. Before this patch, the "stop on first error" logic would return immediately from the "run tests" function, without waiting on test threads to complete. There was thus a race between the test runner thread doing cleanup work and the test thread performing activity. For example, the test thread could be in the middle of executing a test shell script and the test runner could remove the test's temporary directory. Depending on timing, this could result in any number of output from the test runner. This patch eliminates the race condition by having the test runner explicitly wait for test threads to complete before continuing. I discovered this issue as I modified the test harness in a subsequent patch and was reliably able to tickle the race condition.
Sat, 28 Mar 2015 00:21:30 -0700 run-tests: report code coverage from source directory
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 00:21:30 -0700] rev 24506
run-tests: report code coverage from source directory As part of testing code coverage output, I noticed some files were being reported twice: there was an entry for the file in the install location and for the file in the source tree. I'm not sure why this is. But it resulted in under-reporting of coverage data since some lines weren't getting covered in both locations. I also noticed that files in the source directory and outside the "mercurial" and "hgext" packages were getting included in the coverage report. Cosmetically, this seemed odd to me. It's not difficult to filter paths from the report. But I figure this data can be useful (we could start reporting run-tests.py coverage, for example). This patch switches the coverage API to report code coverage from the source directory. It registers a path alias so that data from the install location is merged into data from the source directory. We now get merged results for files that were being reported in multiple locations. Since code coverage reporting now relies on the profiled install now being in sync with the source tree, an additional check to disallow code coverage when --with-hg is specified has been added. This should have been present before, as --local was previously disallowed for the same reasons. Merging the paths raises our aggregate line coverage from ~60 to 81%.
Sat, 28 Mar 2015 00:47:58 -0700 run-tests: collect aggregate code coverage
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 00:47:58 -0700] rev 24505
run-tests: collect aggregate code coverage Before this patch, every Python process during a code coverage run was writing coverage data to the same file. I'm not sure if the coverage package even tries to obtain a lock on the file. But what I do know is there was some last write wins leading to loss of code coverage data, at least with -j > 1. This patch changes the code coverage mechanism to be multiple process safe. The mechanism for initializing code coverage via sitecustomize.py has been tweaked so each Python process will produce a separate coverage data file on disk. Unless two processes generate the same random value, there are no race conditions writing to the same file. At the end of the test run, we combine all written files into an aggregate report. On my machine, running the full test suite produces a little over 20,000 coverage files consuming ~350 MB. As you can imagine, it takes several seconds to load and merge these coverage files. But when it is done, you have an accurate picture of the aggregate code coverage for the entire test suite, which is ~60% line coverage.
Fri, 27 Mar 2015 23:17:19 -0700 run-tests: obtain code coverage via Python API
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 27 Mar 2015 23:17:19 -0700] rev 24504
run-tests: obtain code coverage via Python API Before, we were invoking the "coverage" program provided by the "coverage" module. This patch changes the code to go through the Python API. This makes the next patch a little bit easier to reason about. A side effect of this patch is that writing code coverage reports will be slightly faster, as we won't have to redundantly load coverage data.
Sat, 28 Mar 2015 12:58:44 -0700 commands.debugrevlog: report max chain length
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 12:58:44 -0700] rev 24503
commands.debugrevlog: report max chain length This is sometimes useful to know. Report it.
Fri, 27 Mar 2015 20:55:54 -0700 _lazymanifest: drop unnecessary call to sorted()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Mar 2015 20:55:54 -0700] rev 24502
_lazymanifest: drop unnecessary call to sorted() The entries returned from _lazymanifest.iterentries() are already sorted.
Sun, 29 Mar 2015 00:00:14 -0400 test-git-export: add globs the test runner wants on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Mar 2015 00:00:14 -0400] rev 24501
test-git-export: add globs the test runner wants on Windows The only difference for the first two was to add the globs, but the third line of output on Windows was '..\dir2\copy'. I'm not sure why 'copy' is output on Windows instead of '*'.
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip