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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | client/site_tests/suite_HWQual/control.auto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7 from autotest_lib.client.bin import test 7 from autotest_lib.client.bin import test
8 from autotest_lib.client.common_lib import utils 8 from autotest_lib.client.common_lib import utils
9 9
10 class gl_Bench(test.test): 10 class gl_Bench(test.test):
11 version = 1 11 version = 1
12 preserve_srcdir = True 12 preserve_srcdir = True
13 13
14 def setup(self): 14 def setup(self):
15 os.chdir(self.srcdir) 15 os.chdir(self.srcdir)
16 utils.system('make clean') 16 utils.system('make clean')
17 utils.system('make') 17 utils.system('make')
18 18
19 19
20 def run_once(self, options=''): 20 def run_once(self, options=''):
21 exefile = os.path.join(self.bindir, 'gl_Bench') 21 exefile = os.path.join(self.bindir, 'gl_Bench')
22 cmd = "X :1 & sleep 1; DISPLAY=:1 %s %s; kill $!" % (exefile, options) 22 cmd = "X :1 & sleep 1; DISPLAY=:1 %s %s; kill $!" % (exefile, options)
23 self.results = utils.system_output(cmd, retain_output=True) 23 self.results = utils.system_output(cmd, retain_output=True)
24 24
25 for keyval in self.results.splitlines(): 25 keyvals = {}
26 if keyval.strip().startswith('#'): 26 for keyval in self.results.splitlines():
27 » continue 27 if keyval.strip().startswith('#'):
28 key, val = keyval.split(':') 28 continue
29 self.write_perf_keyval({key.strip(): val.strip()}) 29 key, val = keyval.split(':')
30 keyvals[key.strip()] = float(val)
31
32 self.write_perf_keyval(keyvals)
OLDNEW
« 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