<div dir="ltr">Yes, some of the problems were that I was encoding in unicode rather than ascii, I was unaware that xml required ascii. changing to ascii did solve most of the problems; however, there were still characters not being properly escaped, and it seemed more trouble than it was worth to fix it.<div>
<br><div style>Since this code exists for your use and you're not interested in a mako version I'll do as you suggest and move the old summary code into piglit-summary-junit, and remove it from summary. I'll send out and updated patch series later today.</div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 27, 2013 at 6:35 AM, Jose Fonseca <span dir="ltr"><<a href="mailto:jfonseca@vmware.com" target="_blank">jfonseca@vmware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dylan,<br>
<br>
I tried it with live results but unfortunately it fails:<br>
<br>
$ ./piglit-summary-junit.py test-llvmpipe-piglit/results/custom.results/<br>
Traceback (most recent call last):<br>
  File "./piglit-summary-junit.py", line 54, in <module><br>
    main()<br>
  File "./piglit-summary-junit.py", line 50, in main<br>
    output.generateJUnit(args.output)<br>
  File "/home/jfonseca/work/vmware/tests/piglit/framework/summary.py", line 645, in generateJUnit<br>
    numberoftests=len(self.tests['all'])))<br>
  File "/usr/lib/python2.7/dist-packages/mako/template.py", line 412, in render<br>
    return runtime._render(self, self.callable_, args, data)<br>
  File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 766, in _render<br>
    **_kwargs_for_callable(callable_, data))<br>
  File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 798, in _render_context<br>
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)<br>
  File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 824, in _exec_template<br>
    callable_(context, *args, **kwargs)<br>
  File "/home/jfonseca/work/vmware/tests/piglit/.makotmp/templates/<a href="http://junit.mako.py" target="_blank">junit.mako.py</a>", line 41, in render_body<br>
    __M_writer(unicode(each['system-err']))<br>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 101: ordinal not in range(128)<br>
<br>
This can be avoided doing<br>
<br>
diff --git a/templates/junit.mako b/templates/junit.mako<br>
index f123878..1a480dd 100644<br>
--- a/templates/junit.mako<br>
+++ b/templates/junit.mako<br>
@@ -3,8 +3,8 @@<br>
   <testsuite name="piglit" tests="${numberoftests}"><br>
   % for each in tests:<br>
     <testcase classname="${each['classname']}" name="${each['testname']}" time="${each['time']}"><br>
-      <system-out>${each['system-out']}</system-out><br>
-      <system-err>${each['system-err']}</system-err><br>
+      <system-out>${each['system-out'].decode('ascii', 'ignore')}</system-out><br>
+      <system-err>${each['system-err'].decode('ascii', 'ignore')}</system-err><br>
     </testcase><br>
   % endfor<br>
   </testsuite><br>
<br>
But still, the output is still very broken -- there are no failures, skips, etc. recorded on the XML.<br>
<br>
<br>
I spent a considerable amount of time in fine tuning the existing junit.py script to work correctly and robustly, and given that nobody else is actually interested in jenkins integration, I rather not to spend time reimplementing this in a different clothing.<br>

<br>
So I'd prefer to keep the non-mako piglit-summary-junit.py implemention.  Feel free to move any old code from framework inside piglit-summary-junit.py though.<br>
<br>
<br>
If you want to verify, I've uploaded the results I used to test to <a href="http://people.freedesktop.org/~jrfonseca/test-llvmpipe-piglit-results.tar.bz2" target="_blank">http://people.freedesktop.org/~jrfonseca/test-llvmpipe-piglit-results.tar.bz2</a><br>

<span class="HOEnZb"><font color="#888888"><br>
<br>
Jose<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
----- Original Message -----<br>
> Yes, it's at my github here: git://<a href="http://github.com/crymson/piglit.git" target="_blank">github.com/crymson/piglit.git</a><br>
>  mako-complete<br>
><br>
> junit isn't too interesting to me or intel (whom I contract with), however<br>
> I converted piglit's html summary to mako a while back, and wrote a new<br>
> summary class for that. I'd like to get all of the summary output using<br>
> this backend, so junit and the text output of piglit-summary.py are targets<br>
> for that.<br>
><br>
><br>
> On Wed, Jun 26, 2013 at 2:54 PM, Jose Fonseca <<a href="mailto:jfonseca@vmware.com">jfonseca@vmware.com</a>> wrote:<br>
><br>
> > ----- Original Message -----<br>
> > > I'm bumping this series hoping to get some review, since I feel it's too<br>
> > > big to 'just push'<br>
> > ><br>
> > > Brian and Jose, I'd specifically appreciate if you would look at the<br>
> > later<br>
> > > set of patches, since they change/replace code that you originally wrote.<br>
> ><br>
> > Thanks for the heads up Dylan.  Sorry for not noticing earlier.  Nobody<br>
> > else showed interest in junit/jenkins so I wasn't expecting it.<br>
> ><br>
> > I'm using the junit.py here in many other places (to conform results from<br>
> > conform, apitrace, mesa demos, MS conformance test, etc) to jenkins/hudson.<br>
> > So having piglit using something else doesn't really save me much work.<br>
> ><br>
> > But I don't object replacing my script with mako -- piglit has its test<br>
> > framework anyway -- provided there are no regressions.<br>
> ><br>
> > I'd like to test first though.  Can I pull this from somewhere, or could<br>
> > you do push this in two phases: 1) first add the new mechanism without<br>
> > touching the old one, then 2) remove it after I have time to run more tests<br>
> > here.<br>
> ><br>
> > Jose<br>
> ><br>
> ><br>
> > > Thanks.<br>
> > ><br>
> > ><br>
> > > On Thu, Jun 13, 2013 at 8:36 AM, Dylan Baker <<a href="mailto:baker.dylan.c@gmail.com">baker.dylan.c@gmail.com</a><br>
> > >wrote:<br>
> > ><br>
> > > > Replaces self.alltests, self.changes, self.problems, self.regressions,<br>
> > > > self.fixes, and self.skipped with self.test, a dictionary containing<br>
> > all<br>
> > > > of the same information. This cleans the namespace for the NewSummary<br>
> > > > object, as well as allowing for some other code simplification<br>
> > > ><br>
> > > > Signed-off-by: Dylan Baker <<a href="mailto:baker.dylan.c@gmail.com">baker.dylan.c@gmail.com</a>><br>
</div></div></blockquote></div><br></div>