[PATCH] run-tests: add --slowtimeout and use it for slow tests

timeless timeless at gmail.com
Sun Nov 29 13:51:50 CST 2015


On Sun, Nov 29, 2015 at 3:47 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> On Sun, 29 Nov 2015 01:49:15 -0500, timeless wrote:
>> Yuya Nishihara wrote:
>> >> @@ -922,7 +934,12 @@
>> This is in     def _hghave(self, reqs):
>>
>> >>              print(stdout)
>> >>              sys.exit(1)
>> >>
>> >> -        return ret == 0
>> >> +        if ret != 0:
>> >> +            return False
>> >> +
>> >> +        if 'slow' in reqs:
>> >> +            self._timeout = self._slowtimeout
>> >
>> > Perhaps it won't work if there's a "#if slow" conditional.
>>
>>             elif l.startswith(b'#if'):
>>                 skipping = not self._hghave(lsplit[1:])
>>
>> It should work :)
>
> Ah, okay, I was wrong. I was afraid that local "#if slow" would affect the
> global timeout value, but that is intended. If there is a slow block, the
> whole test should be slow.
>
>> > and I think two "sleep 10" are enough slow to have "#if slow".
>>
>> I wanted my test to show what changes/doesn't change. But I'm flexible.
>
> Do we need 10sec?

Oh, probably not
sleep 2 and slowtimeout 3 should work fine


More information about the Mercurial-devel mailing list