[Piglit] [V2 PATCH 09/12] piglit-summary.py: print number of fixes and regressions

Kenneth Graunke kenneth at whitecape.org
Tue Jul 2 11:39:45 PDT 2013


On 06/28/2013 06:49 AM, Dylan Baker wrote:
> This information is actually quite useful. It should be noted the
> limitation of the text syntax, in that this is the fixes and regressions
> (and even changes) from the second to last to last provided json file.
> ---
>   framework/summary.py | 22 ++++++++++++----------
>   1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/framework/summary.py b/framework/summary.py
> index 7686b0e..305f5eb 100644
> --- a/framework/summary.py
> +++ b/framework/summary.py
> @@ -824,7 +824,7 @@ class NewSummary:
>
>           # If there are more than one set of results we need to find changes
>           if len(self.results) > 1:
> -            self.__generate_lists(['changes'])
> +            self.__generate_lists(['changes', 'fixes', 'regressions'])
>
>           # Print the name of the test and the status from each test run
>           if not summary:
> @@ -832,21 +832,23 @@ class NewSummary:
>                   for test in self.tests['changes']:
>                       print "%(test)s: %(statuses)s" % {'test': test, 'statuses':
>                       ' '.join([i.tests.get(test, {'result': 'skip'})['result']
> -                        for i in self.results])}
> +                             for i in self.results])}
>               else:
>                   for test in self.tests['all']:
>                       print "%(test)s: %(statuses)s" % {'test': test, 'statuses':
>                       ' '.join([i.tests.get(test, {'result': 'skip'})['result']
> -                        for i in self.results])}
> +                             for i in self.results])}

These two lines seem to be whitespace fixes that look like they belong 
in patch 6.  Not a big deal, but.

>
>           # Print the summary
>           print "summary:"
> -        print "   pass: %d" % self.totals['pass']
> -        print "   fail: %d" % self.totals['fail']
> -        print "  crash: %d" % self.totals['crash']
> -        print "   skip: %d" % self.totals['skip']
> -        print "   warn: %d" % self.totals['warn']
> +        print "       pass: %d" % self.totals['pass']
> +        print "       fail: %d" % self.totals['fail']
> +        print "      crash: %d" % self.totals['crash']
> +        print "       skip: %d" % self.totals['skip']
> +        print "       warn: %d" % self.totals['warn']
>           if self.tests['changes']:
> -            print "changes: %d" % len(self.tests['changes'])
> +            print "    changes: %d" % len(self.tests['changes'])
> +            print "      fixes: %d" % len(self.tests['fixes'])
> +            print "regressions: %d" % len(self.tests['regressions'])
>
> -        print "  total: %d" % sum(self.totals.values())
> +        print "      total: %d" % sum(self.totals.values())
>



More information about the Piglit mailing list