Index: client/site_tests/gl_Bench/gl_Bench.py |
diff --git a/client/site_tests/gl_Bench/gl_Bench.py b/client/site_tests/gl_Bench/gl_Bench.py |
index 6cc08faed30f4c41373f9446074fbde8042cce3c..f82711520e344be47dad3a4fba7fcf134fc8499b 100644 |
--- a/client/site_tests/gl_Bench/gl_Bench.py |
+++ b/client/site_tests/gl_Bench/gl_Bench.py |
@@ -12,18 +12,21 @@ class gl_Bench(test.test): |
preserve_srcdir = True |
def setup(self): |
- os.chdir(self.srcdir) |
- utils.system('make clean') |
- utils.system('make') |
+ os.chdir(self.srcdir) |
+ utils.system('make clean') |
+ utils.system('make') |
def run_once(self, options=''): |
- exefile = os.path.join(self.bindir, 'gl_Bench') |
- cmd = "X :1 & sleep 1; DISPLAY=:1 %s %s; kill $!" % (exefile, options) |
- self.results = utils.system_output(cmd, retain_output=True) |
- |
- for keyval in self.results.splitlines(): |
- if keyval.strip().startswith('#'): |
- continue |
- key, val = keyval.split(':') |
- self.write_perf_keyval({key.strip(): val.strip()}) |
+ exefile = os.path.join(self.bindir, 'gl_Bench') |
+ cmd = "X :1 & sleep 1; DISPLAY=:1 %s %s; kill $!" % (exefile, options) |
+ self.results = utils.system_output(cmd, retain_output=True) |
+ |
+ keyvals = {} |
+ for keyval in self.results.splitlines(): |
+ if keyval.strip().startswith('#'): |
+ continue |
+ key, val = keyval.split(':') |
+ keyvals[key.strip()] = float(val) |
+ |
+ self.write_perf_keyval(keyvals) |