<div dir="ltr">Yes, it's at my github here: git://<a href="http://github.com/crymson/piglit.git" target="_blank">github.com/crymson/piglit.git</a> mako-complete<div><br></div><div>junit isn't too interesting to me or intel (whom I contract with), however I converted piglit's html summary to mako a while back, and wrote a new summary class for that. I'd like to get all of the summary output using this backend, so junit and the text output of piglit-summary.py are targets for that.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 26, 2013 at 2:54 PM, 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"><div class="im">----- 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 later<br>
> set of patches, since they change/replace code that you originally wrote.<br>
<br>
</div>Thanks for the heads up Dylan. Sorry for not noticing earlier. Nobody 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 conform, apitrace, mesa demos, MS conformance test, etc) to jenkins/hudson. 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 framework anyway -- provided there are no regressions.<br>
<br>
I'd like to test first though. Can I pull this from somewhere, or could you do push this in two phases: 1) first add the new mechanism without touching the old one, then 2) remove it after I have time to run more tests here.<br>
<span class="HOEnZb"><font color="#888888"><br>
Jose<br>
</font></span><div class="HOEnZb"><div class="h5"><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>>wrote:<br>
><br>
> > Replaces self.alltests, self.changes, self.problems, self.regressions,<br>
> > self.fixes, and self.skipped with self.test, a dictionary containing 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>
> > ---<br>
> > framework/summary.py | 35 +++++++++++++++--------------------<br>
> > 1 file changed, 15 insertions(+), 20 deletions(-)<br>
> ><br>
> > diff --git a/framework/summary.py b/framework/summary.py<br>
> > index b5ddd95..bd0f4cd 100644<br>
> > --- a/framework/summary.py<br>
> > +++ b/framework/summary.py<br>
> > @@ -360,7 +360,7 @@ class HTMLIndex(list):<br>
> > self._endRow()<br>
> ><br>
> > # Add the groups and tests to the out list<br>
> > - for key in sorted(getattr(summary, page)):<br>
> > + for key in sorted(page):<br>
> ><br>
> > # Split the group names and test names, then determine<br>
> > # which groups to close and which to open<br>
> > @@ -628,12 +628,8 @@ class NewSummary:<br>
> ><br>
> > self.status = {}<br>
> > self.fractions = {}<br>
> > - self.alltests = []<br>
> > - self.changes = []<br>
> > - self.problems = []<br>
> > - self.skipped = []<br>
> > - self.regressions = []<br>
> > - self.fixes = []<br>
> > + self.tests = {'all': [], 'changes': [], 'problems': [],<br>
> > 'skipped': [],<br>
> > + 'regressions': [], 'fixes': []}<br>
> ><br>
> > for each in self.results:<br>
> > # Build a dict of the status output of all of the tests, with<br>
> > the<br>
> > @@ -644,12 +640,11 @@ class NewSummary:<br>
> > self.status.update({<a href="http://each.name" target="_blank">each.name</a>: status})<br>
> ><br>
> > # Create a list with all the test names in it<br>
> > - self.alltests = list(set(self.alltests) | set(each.tests))<br>
> > + self.tests['all'] = list(set(self.tests['all']) |<br>
> > set(each.tests))<br>
> ><br>
> > - # Create lists similar to self.alltests, but for the other root<br>
> > pages,<br>
> > - # (regressions, skips, ect). Special is used to makr things that<br>
> > cannot<br>
> > - # be comapred (like 'not run')<br>
> > - for test in self.alltests:<br>
> > + # Create lists similar to self.tests['all'], but for the other<br>
> > root<br>
> > + # pages, (regressions, skips, ect)<br>
> > + for test in self.tests['all']:<br>
> > status = []<br>
> > for each in self.results:<br>
> > try:<br>
> > @@ -657,23 +652,23 @@ class NewSummary:<br>
> > except KeyError:<br>
> > status.append(status_to_number("special"))<br>
> ><br>
> > - # Check and append self.changes<br>
> > + # Check and append self.tests['changes']<br>
> > # A set cannot contain duplicate entries, so creating a set<br>
> > out<br>
> > # the list will reduce it's length to 1 if all entries are the<br>
> > # same, meaning it is not a change<br>
> > if len(set(status)) > 1:<br>
> > - self.changes.append(test)<br>
> > + self.tests['changes'].append(test)<br>
> ><br>
> > # Problems<br>
> > # If the result contains a value other than 1 (pass) or 4<br>
> > (skip)<br>
> > # it is a problem. Skips are not problems becasuse they have<br>
> > # Their own page.<br>
> > if [i for e in [2, 3, 5] for i in status if e is i]:<br>
> > - self.problems.append(test)<br>
> > + self.tests['problems'].append(test)<br>
> ><br>
> > # skipped<br>
> > if 4 in status:<br>
> > - self.skipped.append(test)<br>
> > + self.tests['skipped'].append(test)<br>
> ><br>
> > # fixes and regressions<br>
> > # check each member against the next member. If the second<br>
> > member<br>
> > @@ -683,9 +678,9 @@ class NewSummary:<br>
> > # a value of 1<br>
> > for i in xrange(len(status) - 1):<br>
> > if status[i] < status[i + 1] and status[i] != 0:<br>
> > - self.regressions.append(test)<br>
> > + self.tests['regressions'].append(test)<br>
> > if status[i] > 1 and status[i + 1] == 1:<br>
> > - self.fixes.append(test)<br>
> > + self.tests['fixes'].append(test)<br>
> ><br>
> > def generateHTML(self, destination, exclude):<br>
> > """<br>
> > @@ -768,7 +763,7 @@ class NewSummary:<br>
> > # alltests, where the other pages all use the same name. ie,<br>
> > # changes.html, self.changes, and page=changes.<br>
> > file = open(path.join(destination, "index.html"), 'w')<br>
> > - file.write(index.render(results=HTMLIndex(self, 'alltests'),<br>
> > + file.write(index.render(results=HTMLIndex(self,<br>
> > self.tests['all']),<br>
> > page='all',<br>
> > colnum=len(self.results),<br>
> > exclude=exclude))<br>
> > @@ -777,7 +772,7 @@ class NewSummary:<br>
> > # Generate the rest of the pages<br>
> > for page in pages:<br>
> > file = open(path.join(destination, page + '.html'), 'w')<br>
> > - file.write(index.render(results=HTMLIndex(self, page),<br>
> > + file.write(index.render(results=HTMLIndex(self,<br>
> > self.tests[page]),<br>
> > page=page,<br>
> > colnum=len(self.results),<br>
> > exclude=exclude))<br>
> > --<br>
> > 1.8.1.4<br>
> ><br>
> ><br>
><br>
</div></div></blockquote></div><br></div>