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

Dylan Baker baker.dylan.c at gmail.com
Tue Jan 12 13:24:50 PST 2016


I hadn't pushed any changes here, and noticed this was still outstanding
while doing some other work. Thanks for doing this work.

On Tue, Jan 12, 2016 at 2:59 AM, Jose Fonseca <jfonseca at vmware.com> wrote:

> Thanks. I wasn't sure if your changes already had taken care of this. I've
> pushed it now.
>
> Jose
>
> On 12/01/16 00:08, Dylan Baker wrote:
>
>> reviewed-by: Dylan Baker <baker.dylan.c at gmail.com
>> <mailto:baker.dylan.c at gmail.com>>
>>
>> On Tue, Dec 8, 2015 at 8:14 AM, Jose Fonseca <jfonseca at vmware.com
>> <mailto: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/20160112/3e18708d/attachment.html>


More information about the Piglit mailing list