[Piglit] Fix bad behavior in GleanTest
Jose Fonseca
jfonseca at vmware.com
Wed Jan 15 05:37:22 PST 2014
Series looks good to me. Much more future proof.
Thanks Dylan.
Jose
----- Original Message -----
> 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
>
More information about the Piglit
mailing list