[Piglit] [PATCH 2/2] summary: Include traceback in the summary files.

Kenneth Graunke kenneth at whitecape.org
Mon Aug 12 14:54:33 PDT 2013


If the Python framework fails to run a program for some reason, it'll
record a 'fail' status.  It also records a 'traceback' key in the
dictionary.

The new summary code missed this when writing the test detail page,
resulting in tests marked as 'fail' with no indication as to why.

Cc: Dylan Baker <baker.dylan.c at gmail.com>
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 framework/summary.py       | 1 +
 templates/test_result.mako | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/framework/summary.py b/framework/summary.py
index 003728a..35500bf 100644
--- a/framework/summary.py
+++ b/framework/summary.py
@@ -545,6 +545,7 @@ class Summary:
                         returncode=value.get('returncode', 'None'),
                         time=value.get('time', 'None'),
                         info=value.get('info', 'None'),
+                        traceback=value.get('traceback', 'None'),
                         command=value.get('command', 'None'),
                         css=path.relpath(resultCss, tPath),
                         index=index))
diff --git a/templates/test_result.mako b/templates/test_result.mako
index 12cb081..410dbb4 100644
--- a/templates/test_result.mako
+++ b/templates/test_result.mako
@@ -40,6 +40,13 @@
           </pre>${command}</pre>
         </td>
       </tr>
+      <tr>
+        <td>Traceback</td>
+        <td>
+          <pre>${traceback}</pre>
+        </td>
+      </tr>
+
     </table>
     <p><a href="${index}">Back to summary</a></p>
   </body>
-- 
1.8.3.4



More information about the Piglit mailing list