[Piglit] [PATCH 1/1] results.py: Print warning when overwriting subtest results

Jan Vesely jan.vesely at rutgers.edu
Wed Sep 3 16:16:39 PDT 2014


Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---

There is none reported for quick.py profile, and tons for cl.py

 framework/results.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/framework/results.py b/framework/results.py
index ddadcc1..7d3a375 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 d.has_key(k):
+		        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



More information about the Piglit mailing list