[Piglit] [PATCH] summary: fix processing of incomplete results in csv output

Dylan Baker baker.dylan.c at gmail.com
Mon Jun 29 13:26:47 PDT 2015


Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>

On Mon, Jun 29, 2015 at 01:40:56PM +0100, Thomas Wood wrote:
> Incomplete results do not include a time or return code, so use a blank
> string as the default value for these keys.
> 
> Signed-off-by: Thomas Wood <thomas.wood at intel.com>
> ---
>  framework/programs/summary.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/framework/programs/summary.py b/framework/programs/summary.py
> index fef5680..069aed9 100644
> --- a/framework/programs/summary.py
> +++ b/framework/programs/summary.py
> @@ -169,8 +169,8 @@ def csv(input_):
>  
>      def write_results(output):
>          for name, result in testrun.tests.iteritems():
> -            output.write("{},{},{},{}\n".format(name, result['time'],
> -                                                result['returncode'],
> +            output.write("{},{},{},{}\n".format(name, result.get('time', ""),
> +                                                result.get('returncode', ""),
>                                                  result['result']))
>  
>      if args.output != "stdout":
> -- 
> 2.4.2
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150629/7bb32d8d/attachment.sig>


More information about the Piglit mailing list