Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: client/site_tests/gl_Bench/gl_Bench.py

Issue 652082: Add GPU performance constraints for hwqual purposes. (Closed)
Patch Set: No need to strip() before float(). Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/site_tests/suite_HWQual/control.auto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | client/site_tests/suite_HWQual/control.auto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698