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

Side by Side Diff: client/site_tests/gl_Bench/gl_Bench.py

Issue 870005: Move gl_Bench into a dep so that it can be re-used among tests (Closed)
Patch Set: Created 10 years, 9 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 | « client/deps/glbench/src.orig/yuv2rgb_2.glslv ('k') | no next file » | 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 self.job.setup_dep(['glbench'])
16 utils.system('make clean')
17 utils.system('make')
18 16
19 17
20 def run_once(self, options=''): 18 def run_once(self, options=''):
21 exefile = os.path.join(self.bindir, 'gl_Bench') 19 dep = 'glbench'
20 dep_dir = os.path.join(self.autodir, 'deps', dep)
21 self.job.install_pkg(dep, 'dep', dep_dir)
22
23 exefile = os.path.join(self.autodir, 'deps/glbench/glbench')
22 cmd = "X :1 & sleep 1; DISPLAY=:1 %s %s; kill $!" % (exefile, options) 24 cmd = "X :1 & sleep 1; DISPLAY=:1 %s %s; kill $!" % (exefile, options)
23 self.results = utils.system_output(cmd, retain_output=True) 25 self.results = utils.system_output(cmd, retain_output=True)
24 26
25 keyvals = {} 27 keyvals = {}
26 for keyval in self.results.splitlines(): 28 for keyval in self.results.splitlines():
27 if keyval.strip().startswith('#'): 29 if keyval.strip().startswith('#'):
28 continue 30 continue
29 key, val = keyval.split(':') 31 key, val = keyval.split(':')
30 keyvals[key.strip()] = float(val) 32 keyvals[key.strip()] = float(val)
31 33
32 self.write_perf_keyval(keyvals) 34 self.write_perf_keyval(keyvals)
OLDNEW
« no previous file with comments | « client/deps/glbench/src.orig/yuv2rgb_2.glslv ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698