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

Dylan Baker baker.dylan.c at gmail.com
Fri Aug 29 17:20:31 PDT 2014


On Friday, August 29, 2014 12:42:26 PM Jose Fonseca wrote:
> 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.

I thought it might :)

> 
> > 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.)

If I understand you correctly, yes. This series allows you to choose a
backend, either the native json backend, or the JUnit xml backend.

> 
> > 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

Thanks Jose, that was what I was hoping you'd have a look at, since most
of this series is just boring incremental API changes anyway.

If no one says anything before then I'm planning to push this Monday or
Tuesday, since the guy here doing the jenkins work is chomping at the
bit to be able to use this.

Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140829/999f8b32/attachment-0001.sig>


More information about the Piglit mailing list