[Piglit] Add support to piglit to write JUnit XML directly

Jose Fonseca jfonseca at vmware.com
Fri Aug 29 04:42:26 PDT 2014


On 28/08/14 23:35, Dylan Baker wrote:
> This series adds support to piglit for multiple results backends, and
> implements a JUnit XML backend as the first consumer of this feature.
>
> JUnit is a standard XML descriptive format used by jenkins for test
> reporting. Currently piglit has a script that is able to convert
> piglit's json output into junit xml. There are two problems with this
> script that this backend re-architecture solves. First, it skips a step
> and the generation of a rather large file. Results are currently ~20MB
> in size, and will only get bigger. Second, this backend is written using
> the lastest python2.7 features, making it easier to port to python3.
>
> Here at Intel we are currently deploying a jenkins framework for testing
> on various generations of intel hardware in a standardized way, having
> this backend is useful for us, and a project that we plan to maintain in
> the long run.

The current translation works OK for us, but if Intel will be 
maintaining this new one, then that's music to my ears.

> This series takes a fairly conservative approach to updating the
> backend, making very small changes over a large number of commits, with
> the majority of the work being converting the existing JSONWriter class
> into a JSONBackend class that is a child of the abstract Backend class.
> This astract class is used to define the API used by backends. This is
> what the first 16 patches do.can'

This essentially means that if one uses the JSON backend, then one won't 
get any HTML out. Right?

I actually wish there was a nice XSL stylesheet out there that would 
produce a nice HTML summary from Junit XML, just for quick visualiation 
when running tests manually.  (There are some JSON XSL stylesheets but 
they don't really show the right information.  And I never had the time 
to make a good one neither.)

> The last three patches implment the JUnit backend.
>

I only saw patch 17/19 (framework: Add a JUnit backend) in detail and 
looks good overall, as the rest of the patches are in piglit framework 
internals I'm not well versed.

Once this goes in I'll try to update our jenkins jobs to start using it, 
and once all wrinkles are ironed out I'd be happy to remove the old one.

Jose


More information about the Piglit mailing list