[Piglit] [PATCH] results.py: Fix bug in 6cc1866e

Dylan Baker baker.dylan.c at gmail.com
Tue Sep 2 23:17:34 PDT 2014

The mentioned commit introduces a bug in which environment is not
written into a sub-dictionary, but directly into the root dictionary of
the json output.

The way piglit is structured these extra keys are thrown away, so they
don't result in a change to the results scheme, only in the loss of

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

diff --git a/framework/results.py b/framework/results.py
index ddadcc1..3977d6a 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -274,8 +274,11 @@ class JSONBackend(FSyncMixin, Backend):
                 self._write_dict_item(key, value)
+            self._write_dict_key('env')
+            self._open_dict()
             for key, value in metadata['env'].iteritems():
                 self._write_dict_item(key, value)
+            self._close_dict()
             # Open the tests dictinoary so that tests can be written

More information about the Piglit mailing list