[Piglit] [PATCH 4/4] framework/backends/junit.py: add start and end time to stderr

Dylan Baker baker.dylan.c at gmail.com
Thu Oct 8 00:20:14 PDT 2015


This adds start and end time to the junit stderr. It would be nice to
have someplace better to put this, but junit doesn't allow extra tags in
the xml, and there are plans to use this data for post processing tasks.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/backends/junit.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index ee1cf28..11fb09e 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -212,6 +212,8 @@ class JUnitBackend(FileBackend):
             # Add stderr
             err = etree.SubElement(element, 'system-err')
             err.text = data.err
+            err.text += '\n\nstart time: {}\nend time: {}\n'.format(
+                data.time.start, data.time.end)
             calculate_result()
         else:
             etree.SubElement(element, 'failure', message='Incomplete run.')
-- 
2.6.1



More information about the Piglit mailing list