Commit 85a3512d authored by Nicolai Hähnle's avatar Nicolai Hähnle

Collect output of glxinfo and lspci

parent 72e7c203
......@@ -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 = []
......
......@@ -91,6 +91,7 @@ def main():
profile = core.loadTestProfile(profileFilename)
env.file = open(resultsDir + '/main', "w")
print >>env.file, "name: %(name)s" % { 'name': core.encode(OptionName) }
env.collectData()
profile.run(env)
env.file.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment