[Piglit] [PATCH] piglit-summary-html.py: Fix the -e/--exclude-details option

Dylan Baker baker.dylan.c at gmail.com
Wed Oct 16 03:33:11 CEST 2013


On Tuesday, October 15, 2013 06:16:53 PM Kenneth Graunke wrote:
> On 10/15/2013 03:58 PM, Dylan Baker wrote:
> > This was broken by a previous commit 06b185187, this patch corrects
> > that oversight allowing exclude to continue working.
> > 
> > Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
> > ---
> > 
> >  piglit-summary-html.py | 15 ++++++++++++---
> >  1 file changed, 12 insertions(+), 3 deletions(-)
> > 
> > diff --git a/piglit-summary-html.py b/piglit-summary-html.py
> > index b9a2996..559e7b8 100755
> > --- a/piglit-summary-html.py
> > +++ b/piglit-summary-html.py
> > @@ -27,6 +27,7 @@ import shutil
> > 
> >  import os.path as path
> >  
> >  import framework.summary as summary
> > 
> > +import framework.status as status
> > 
> >  from framework.core import checkDir, parse_listfile
> >  
> >  sys.path.append(path.dirname(path.realpath(sys.argv[0])))
> > 
> > @@ -65,9 +66,17 @@ def main():
> >      if not args.list and not args.resultsFiles:
> >          raise parser.error("Missing required option -l or
> >          <resultsFiles>")
> > 
> > -    # If exclude-results has all, then change it to be all
> > -    if 'all' in args.exclude_details:
> > -        args.exclude_details = ['skip', 'pass', 'warn', 'crash', 'fail']
> > +    # Convert the exclude_details list to status objects, without this
> > using +    # the -e option will except
> > +    if args.exclude_details:
> > +        # If exclude-results has all, then change it to be all
> > +        if 'all' in args.exclude_details:
> > +            args.exclude_details = [status.Skip(), status.Pass(),
> > status.Warn(), +                                    status.Crash(),
> > status.Fail()] +        else:
> > +            args.exclude_details = [status.status_lookup(i) for i in
> > +                                    args.exclude_details]
> > +
> > 
> >      # if overwrite is requested delete the output directory
> 
> >      if path.exists(args.summaryDir) and args.overwrite:
> Committed - thanks for the prompt fix.
> 
> But, shouldn't this also include the new dmesg statuses?

probably, I'll have a look at that. 

I was mostly concerned with the fact that I'd broken something and should 
probably fix it.
-------------- 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/20131015/98ec424d/attachment.pgp>


More information about the Piglit mailing list