[Piglit] [PATCH] results.py: Fix bug introduced in aa360f82

Dylan Baker baker.dylan.c at gmail.com
Wed Sep 3 08:13:26 PDT 2014

This is a sort of odd bug. The behavior before this patch was that env
was written into the options dictionary in the json, and each pair out
of the env dictionary was written directly into the root of the json
dictionary. Due to a feature that throws out keys that the json isn't
aware of in the root these extra keys were removed, and only the one in
the options dict was preserved.

The bug is that the wrong instance of env was removed, the patch
mentioned removed the env entry in the options dict, and left the env in
the root of the dictionary where it didn't belong.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
 framework/results.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/framework/results.py b/framework/results.py
index ddadcc1..820bc97 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -266,7 +266,7 @@ class JSONBackend(FSyncMixin, Backend):
             for key, value in metadata.iteritems():
                 # Dont' write env or name into the options dictionary
-                if key in ['env', 'name']:
+                if key == 'name':
                 # Loading a NoneType will break resume, and are a bug
@@ -274,9 +274,6 @@ class JSONBackend(FSyncMixin, Backend):
                 self._write_dict_item(key, value)
-            for key, value in metadata['env'].iteritems():
-                self._write_dict_item(key, value)
             # Open the tests dictinoary so that tests can be written

More information about the Piglit mailing list