[Piglit] [PATCH 2/2] framework: Get traceback into json results.

Dylan Baker baker.dylan.c at gmail.com
Mon Jan 11 16:08:16 PST 2016


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

On Tue, Dec 8, 2015 at 8:14 AM, Jose Fonseca <jfonseca at vmware.com> wrote:

> Exceptions were not reaching it.
> ---
>  framework/results.py       | 3 ++-
>  templates/test_result.mako | 8 ++++++++
>  2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/framework/results.py b/framework/results.py
> index eeffcb7..ef19fd4 100644
> --- a/framework/results.py
> +++ b/framework/results.py
> @@ -196,6 +196,7 @@ class TestResult(object):
>              'subtests': self.subtests,
>              'time': self.time,
>              'exception': self.exception,
> +            'traceback': self.traceback,
>              'dmesg': self.dmesg,
>          }
>          return obj
> @@ -215,7 +216,7 @@ class TestResult(object):
>          # pylint: disable=assigning-non-slot
>          inst = cls()
>
> -        for each in ['returncode', 'command', 'exception', 'environment',
> +        for each in ['returncode', 'command', 'exception', 'traceback',
> 'environment',
>                       'time', 'result', 'dmesg']:
>              if each in dict_:
>                  setattr(inst, each, dict_[each])
> diff --git a/templates/test_result.mako b/templates/test_result.mako
> index 229a5a7..ff08797 100644
> --- a/templates/test_result.mako
> +++ b/templates/test_result.mako
> @@ -75,6 +75,14 @@
>            </pre>${value.command}</pre>
>          </td>
>        </tr>
> +    % if value.exception:
> +      <tr>
> +        <td>Exception</td>
> +        <td>
> +          <pre>${value.exception | h}</pre>
> +        </td>
> +      </tr>
> +    % endif
>      % if value.traceback:
>        <tr>
>          <td>Traceback</td>
> --
> 2.5.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20160111/a3c57d0c/attachment.html>


More information about the Piglit mailing list