[Piglit] [PATCH] framework/cl: Don't override timeout setting from cmdline

Dylan Baker dylan at pnwbakers.com
Mon Jul 1 16:19:12 UTC 2019


Quoting Jan Vesely (2019-06-28 17:13:09)
> On Fri, Jun 28, 2019 at 7:46 PM Dylan Baker <dylan at pnwbakers.com> wrote:
> >
> > Quoting Jan Vesely (2019-06-28 13:01:36)
> > > From: Jan Vesely <jano.vesely at gmail.com>
> > >
> > > Signed-off-by: Jan Vesely <jano.vesely at gmail.com>
> > > ---
> > >  framework/test/piglit_test.py | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py
> > > index b4e6eb444e0..0881f00a6d6 100644
> > > --- a/framework/test/piglit_test.py
> > > +++ b/framework/test/piglit_test.py
> > > @@ -215,7 +215,8 @@ class PiglitCLTest(PiglitBaseTest):  # pylint: disable=too-few-public-methods
> > >
> > >      """
> > >      def __init__(self, command, run_concurrent=CL_CONCURRENT, **kwargs):
> > > -        self.timeout = 60
> > > +        if self.timeout is None:
> > > +            self.timeout = 60
> >
> > Sorry I wont have time to look closer at this till Monday. I think if you put
> > the timeout at the class level it will just work. At least, that's how I seem to
> > remember designing it to work, but it's been a while.
> 
> There's time, the current limit should be enough for most users.
> I tried setting a class timeout attribute in PigliTCLTest, but it didn't work.
> iiuc, the cmdline value updates the parent class timeout (base.Test.timeout)
> However, when accessing self.timeout the child value
> (PiglitCLTest.timeout) is used and takes precedence, thus always
> overriding the cmline value.
> 
> Jan
> 

Given that, this seems resonable:

Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20190701/fada04e5/attachment.sig>


More information about the Piglit mailing list