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

Yuya Nishihara yuya at tcha.org
Tue Dec 1 13:03:41 UTC 2015


On Sun, 29 Nov 2015 14:51:50 -0500, timeless wrote:
> 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

Changed timeout values and pushed to the clowncopter, thanks.


More information about the Mercurial-devel mailing list