[Piglit] Generate testlists at buildtime

Dylan Baker baker.dylan.c at gmail.com
Mon Sep 16 09:32:36 PDT 2013


On Monday 16 September 2013 09:25:25 Eric Anholt wrote:
> Dylan Baker <baker.dylan.c at gmail.com> writes:
> > This series changes the way testlists are generated. This allows us to
> > generate a TestProfile object only once, at build time. This is
> > accomplished by using python's pickle module, which stores a python
> > object representation as a plain text file.
> > 
> > The first 9 patches touch all of the testfiles the majority of these
> > patches simply replace ``from <foo> import *'' with explicit imports.
> > This is the recomended way of doing things from the python devs. r600 is
> > removed, since it *is* quick-driver.tests, as is external-glparser.tests
> > since it is deprecated.
> > 
> > The last patch does all of the heavy lifting, moving all of the tests
> > files to a new folder, and adding the CMake magic to generate the
> > testslists
> > 
> > There are a couple of reasons for doing this:
> > 1) Since piglit-run is no longer responsible for producing
> > 
> >    the TestProfile objects, it is much simpler to change the format
> >    they are stored it. This is to our advantage as we try to create a
> >    python3 branch of piglit since ``execfile'' is deprecated in python3
> > 
> > 2) This takes a few seconds off the start of piglit-run, since all of
> > 
> >    the heavy liftiner of running the python *tests files are removed,
> >    instead being done durring build time
> 
> Can I still use an old-style .tests (possibly renamed to .py)?  I use
> out-of-tree tests lists for running tests in other projects.
> 
> Given that test runs take ~10 minutes, I don't feel the increased
> complexity of the system justifies shaving off at most 1.5 seconds of
> startup time (on my system here).

Sure, that's three lines of code.

My thought was to take the small script used to generate the pickled tests and 
extend that to be used to generate custom test lists. So, for example, if one 
wanted a list of piglit's gl tests plus the khronos tests they could easily 
generate such a list.

This is a pretty big win for me with what I do, since working on the framework 
I tend to run a very small set of tests (1-20) many times, where the parsing 
and creation of the TestProfile object can actually take longer than running 
thos tests.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130916/3590fe8d/attachment.pgp>


More information about the Piglit mailing list