[Piglit] [PATCH v2 1/1] results.py: Print warning when overwriting subtest results
Dylan Baker
baker.dylan.c at gmail.com
Mon Sep 8 11:47:41 PDT 2014
Sure, done.
On Monday, September 08, 2014 10:54:48 AM Jan Vesely wrote:
> On Thu, 2014-09-04 at 15:39 -0700, Dylan Baker wrote:
> > Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
>
> thank you. Can you push it as well? I don't have commit access.
>
> jan
>
> >
> > On Thursday, September 04, 2014 06:14:11 PM Jan Vesely wrote:
> > > v2: don't mix tabs and spaces
> > > use 'in' instead of 'has_key'
> > >
> > > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> > > ---
> > > framework/results.py | 8 +++++---
> > > 1 file changed, 5 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/framework/results.py b/framework/results.py
> > > index ddadcc1..820b39c 100644
> > > --- a/framework/results.py
> > > +++ b/framework/results.py
> > > @@ -465,15 +465,17 @@ class TestResult(dict):
> > > dictionary -- a dictionary instance to update the TestResult with
> > >
> > > """
> > > - def update(d, u):
> > > + def update(d, u, check):
> > > for k, v in u.iteritems():
> > > if isinstance(v, dict):
> > > - d[k] = update(d.get(k, {}), v)
> > > + d[k] = update(d.get(k, {}), v, True)
> > > else:
> > > + if check and k in d:
> > > + print("Warning: duplicate subtest: {} value: {} old value: {}".format(k, v, d[k]))
> > > d[k] = v
> > > return d
> > >
> > > - update(self, dictionary)
> > > + update(self, dictionary, False)
> > >
> > >
> > > class TestrunResult(object):
> > > --
> > > 1.9.3
> > >
>
> --
> Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140908/5be96bc6/attachment-0001.sig>
More information about the Piglit
mailing list