[Piglit] [PATCH 1/2] core: print the real command with arguments in the test report

Marek Olšák maraeo at gmail.com
Mon Apr 4 07:45:40 PDT 2011


---
 framework/exectest.py  |    1 +
 framework/gleantest.py |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/framework/exectest.py b/framework/exectest.py
index 47924e7..114908c 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -82,6 +82,7 @@ class PlainExecTest(Test):
 
 			results['info'] = "@@@Returncode: %d\n\nErrors:\n%s\n\nOutput:\n%s" % (proc.returncode, err, out)
 			results['returncode'] = proc.returncode
+			results['command'] = ' '.join(self.command)
 		else:
 			results = TestResult()
 			if 'result' not in results:
diff --git a/framework/gleantest.py b/framework/gleantest.py
index 90291c8..1de4bba 100644
--- a/framework/gleantest.py
+++ b/framework/gleantest.py
@@ -72,6 +72,12 @@ class GleanTest(Test):
 			results['result'] = 'fail'
 
 		results['returncode'] = glean.returncode
+		results['command'] = ' '.join(self.command + GleanTest.globalParams)
+
+		env = ''
+		for key in self.env:
+			env = env + key + '="' + self.env[key] + '" ';
+		results['environment'] = env
 
 		self.handleErr(results, err)
 
-- 
1.7.1



More information about the Piglit mailing list