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

Dylan Baker baker.dylan.c at gmail.com
Mon Sep 8 14:32:55 PDT 2014


bump

On Wednesday, September 03, 2014 08:13:26 AM Dylan Baker wrote:
> 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):
>              self._open_dict()
>              for key, value in metadata.iteritems():
>                  # Dont' write env or name into the options dictionary
> -                if key in ['env', 'name']:
> +                if key == 'name':
>                      continue
>  
>                  # Loading a NoneType will break resume, and are a bug
> @@ -274,9 +274,6 @@ class JSONBackend(FSyncMixin, Backend):
>                  self._write_dict_item(key, value)
>              self._close_dict()
>  
> -            for key, value in metadata['env'].iteritems():
> -                self._write_dict_item(key, value)
> -
>              # Open the tests dictinoary so that tests can be written
>              self._write_dict_key('tests')
>              self._open_dict()
> -- 
> 2.1.0
> 
-------------- 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/fb0e0a35/attachment.sig>


More information about the Piglit mailing list