[Piglit] [PATCH 06/16] junit.mako: Adds new mako file for generating junit xml

Dylan Baker baker.dylan.c at gmail.com
Thu Jun 13 08:36:13 PDT 2013


Using mako as an alternative to the junit.py file has a couple of
advantages: First there is a lot less code involved, mako just does most
of the work for us. Second, it works in almost the same way as the HTML
generation.

Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 templates/junit.mako | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 templates/junit.mako

diff --git a/templates/junit.mako b/templates/junit.mako
new file mode 100644
index 0000000..ef1a474
--- /dev/null
+++ b/templates/junit.mako
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuites>
+  <testsuite name="piglit">
+  % for each in tests:
+    <testcase classname="${each['classname']}" name="${each['testname']}" time="${each['time']}">
+      <system-out>${each['system-out']}</system-out>
+      <system-err>${each['system-err']}</system-err>
+    </testcase>
+  % endfor
+  </testsuite>
+</testsuites>
-- 
1.8.1.4



More information about the Piglit mailing list