diff options
author | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-06-06 18:31:04 +0200 |
---|---|---|
committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-06-06 18:31:04 +0200 |
commit | 85a3512d88dcc628f5723675cb7ce24012131fc3 (patch) | |
tree | 3076c44eae3110e600ffd3baa35b3e060751c8a4 /framework | |
parent | 72e7c203d1ac36731c63e089ea409afdde935240 (diff) |
Collect output of glxinfo and lspci
Diffstat (limited to 'framework')
-rw-r--r-- | framework/core.py | 15 |
1 files changed, 13 insertions, 2 deletions
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 = [] |