[Piglit] [PATCH 7/7] summary: Fold __generate_lists into __init__

Dylan Baker baker.dylan.c at gmail.com
Fri Sep 27 15:31:40 PDT 2013


On Friday, September 27, 2013 05:29:57 PM Ken Phillis Jr wrote:
> This patch looks good. The only suggest I have is to double check spelling
> on the commit logs and comments... For example, The word "nothign" should
> be  nothing.
> 
> On Fri, Sep 27, 2013 at 4:39 PM, Dylan Baker <baker.dylan.c at gmail.com>wrote:
> > Since there is nothign special about __generate_lists anymore (it just
> > does the same thing all the time), just fold it back into the
> > constructor and save on having to call it.
> > 
> > Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
> > ---
> > 
> >  framework/summary.py | 26 ++++----------------------
> >  1 file changed, 4 insertions(+), 22 deletions(-)
> > 
> > diff --git a/framework/summary.py b/framework/summary.py
> > index 1a899e7..158e59b 100644
> > --- a/framework/summary.py
> > +++ b/framework/summary.py
> > 
> > @@ -363,8 +363,8 @@ class Summary:
> >          self.status = {}
> >          self.fractions = {}
> > 
> > -        self.tests = {'all': set(), 'changes': set(), 'problems': set(),
> > 'skipped': set(),
> > -                      'regressions': set(), 'fixes': set()}
> > +        self.tests = {'all': set(), 'changes': set(), 'problems': set(),
> > +                      'skipped': set(), 'regressions': set(), 'fixes':
> > set()}
> > 
> >          for each in self.results:
> >              # Build a dict of the status output of all of the tests, with
> > 
> > the
> > 
> > @@ -377,20 +377,8 @@ class Summary:
> >              # Create a list with all the test names in it
> >              self.tests['all'] = set(self.tests['all']) | set(each.tests)
> > 
> > -    def __generate_lists(self):
> > -        """
> > -        Private: Generate the lists of changes, problems, regressions,
> > fixes,
> > -        and skips
> > -
> > -        lists is a list contianing any of the following: changes,
> > problems,
> > -        skips, fixes (which will also generate regressions)
> > -
> > -        This method has different code paths to allow the exclusion of
> > certain
> > -        lists being generated. This is both useful for speeding up HTML
> > -        generation when a page isn't needed (regressions with only one
> > test
> > -        file is provided), and for JUnit and text which only need a
> > limited
> > -        subset of these lists
> > -        """
> > +        # Craete the lists of statuses like problems, regerssions, fixes,
> > +        # changes and skips
> > 
> >          for test in self.tests['all']:
> >              status = []
> > 
> >              for each in self.results:
> > @@ -509,8 +497,6 @@ class Summary:
> >                                  output_encoding="utf-8",
> >                                  module_directory=".makotmp")
> > 
> > -        self.__generate_lists()
> > -
> > 
> >          # Index.html is a bit of a special case since there is index,
> > 
> > all, and
> > 
> >          # alltests, where the other pages all use the same name. ie,
> >          # changes.html, self.changes, and page=changes.
> > 
> > @@ -542,10 +528,6 @@ class Summary:
> >      def generateText(self, diff, summary):
> >          self.__find_totals()
> > 
> > -        # If there are more than one set of results we need to find
> > changes
> > -        if len(self.results) > 1:
> > -            self.__generate_lists()
> > -
> > 
> >          # Print the name of the test and the status from each test run
> >          
> >          if not summary:
> >              if diff:
> > --
> > 1.8.1.5
> > 
> > _______________________________________________
> > Piglit mailing list
> > Piglit at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit

Done.

Also cc'd the list :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130927/4d9aa62f/attachment.pgp>


More information about the Piglit mailing list