From 85a3512d88dcc628f5723675cb7ce24012131fc3 Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Fri, 6 Jun 2008 18:31:04 +0200 Subject: Collect output of glxinfo and lspci --- framework/core.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'framework') diff --git a/framework/core.py b/framework/core.py index 9e282afc2..53624b762 100644 --- a/framework/core.py +++ b/framework/core.py @@ -179,8 +179,8 @@ class TestrunResult: key = line[:colon] value = decode(line[colon+2:]) - if key == 'name': - self.name = value + if key in ['name', 'glxinfo', 'lspci']: + self.__dict__[key] = value elif key == '@test': comp = value.split('/') group = self.results @@ -216,6 +216,17 @@ class Environment: self.execute = True self.filter = [] + def run(self,command): + p = subprocess.Popen( + command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + (stdout,stderr) = p.communicate(); + return stderr+stdout + print >>self.file, "glxinfo:", encode(stderr+stdout) + + def collectData(self): + print >>self.file, "glxinfo:", encode(self.run('glxinfo')) + print >>self.file, "lspci:", encode(self.run('lspci')) + class Test: ignoreErrors = [] -- cgit v1.2.3