[Piglit] Fix bad behavior in GleanTest
Michel Dänzer
michel at daenzer.net
Tue Jan 14 21:31:02 PST 2014
On Die, 2014-01-14 at 15:48 -0800, Dylan Baker wrote:
> GleanTest has a pretty bad behavioral problem that was exposed by the
> conversion from execfile() to importing piglit tests. This problem is
> related to GleanTest's unique globalParams class attribute, which is
> used to add arguments to all glean tests; in this case it is used to set
> the --quick option in quick.py. The problem is that this parameter is
> add by the constructor to a static attribute at instance initialization,
> so setting or changing that parameter only applies to new GleanTest
> instances. This is not clear or straightforward behavior.
>
> Jose spotted this problem and implemented a workaround quickly, but this
> behavior is bad and should be properly fixed to prevent future
> breakages.
>
> Patch 1 adds a test to demonstrate the problem, and to show that the
> solution fixes it.
>
> Patch 2 fixes the problem, using getters and setters to apply the
> globalParams dynamically rather than statically
>
> Patch 3 reverts the workaround, since the problem is now fixed, and the
> workaround is not pep8 compliant
The series is
Tested-by: Michel Dänzer <michel.daenzer at amd.com>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the Piglit
mailing list