[PATCH RFC] tests: remaining Windows failures
Matt Harbison
mharbison72 at gmail.com
Fri Apr 21 01:19:28 UTC 2017
On Thu, 20 Apr 2017 10:42:50 -0400, Jun Wu <quark at fb.com> wrote:
> Excerpts from Matt Harbison's message of 2017-04-19 23:04:17 -0400:
>> [...]
>> diff --git a/tests/test-worker.t b/tests/test-worker.t
>> --- a/tests/test-worker.t
>> +++ b/tests/test-worker.t
>> @@ -81,7 +81,6 @@
>> $ hg --config "extensions.t=$abspath" --config 'worker.numcpus=2' \
>> > test 100000.0 abort --traceback 2>&1 | grep '^Traceback'
>> Traceback (most recent call last):
>> - Traceback (most recent call last):
>
> This is because worker only works for POSIX. Related code are:
>
> if pycompat.osname == 'posix':
> _startupcost = 0.01
> else:
> _startupcost = 1e30
>
> def worthwhile(ui, costperop, nops):
> '''try to determine whether the benefit of multiple processes can
> outweigh the cost of starting them'''
> linear = costperop * nops
> workers = _numworkers(ui)
> benefit = linear - (_startupcost * workers + linear / workers)
> return benefit >= 0.15
>
> worthwhile return False because benefit is negative.
>
> if pycompat.osname != 'nt':
> _platformworker = _posixworker
> _exitstatus = _posixexitstatus
>
> _platformworker is undefined on Windows.
Thanks for the detailed explanation.
>
>>
>> Traceback must be printed for unknown exceptions
More information about the Mercurial-devel
mailing list