[Piglit] [PATCH 2/2] framework/backends/junit: Prepend command line to stdout.

jfonseca at vmware.com jfonseca at vmware.com
Thu Nov 20 04:06:46 PST 2014


From: José Fonseca <jfonseca at vmware.com>

Showing the command line of the test is quite useful, specially when
diagnosing failures.

Unfortunately JUnit format allows no better place to have it other than
stdout/stderr.
---
 framework/backends/junit.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index 1c27e98..59d06c6 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -144,6 +144,9 @@ class JUnitBackend(FileBackend):
         out = etree.SubElement(element, 'system-out')
         out.text = data['out']
 
+        # Prepend command line to stdout
+        out.text = data['command'] + '\n' + out.text
+
         # Add stderr
         err = etree.SubElement(element, 'system-err')
         err.text = data['err']
-- 
1.9.1



More information about the Piglit mailing list