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

Side by Side Diff: tools/perf/run_multipage_benchmarks

Issue 12252020: Add a telemetry-based gpu_tests folder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/test/gpu/run_gpu_tests ('k') | tools/telemetry/telemetry/page/page_test_runner.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 import imp 5 import imp
6 import os 6 import os
7 import sys 7 import sys
8 import urllib 8 import urllib
9 9
10 # Directory path in which to save bootstrap files. 10 # Directory path in which to save bootstrap files.
11 BOOTSTRAPPED_FILES_DIR = 'support/bootstrap_files' 11 BOOTSTRAPPED_FILES_DIR = 'support/bootstrap_files'
12 12
13 13
14 def bootstrapIfNeeded(module_name, module_path, module_deps_url): 14 def bootstrapIfNeeded(module_name, module_path, module_deps_url):
15 """Ensures that the given module_name is available, grab from URL if not.""" 15 """Ensures that the given module_name is available, grab from URL if not."""
16 try: 16 try:
17 imp.find_module(module_name) 17 imp.find_module(module_name)
18 return 18 return
19 except ImportError: 19 except ImportError:
20 sys.path.append(os.path.join(os.path.dirname(__file__), 20 sys.path.append(os.path.join(os.path.dirname(__file__),
21 BOOTSTRAPPED_FILES_DIR, 21 BOOTSTRAPPED_FILES_DIR,
22 module_path)) 22 module_path))
23 try: 23 try:
24 imp.find_module(module_name) 24 imp.find_module(module_name)
25 return 25 return
26 except ImportError: 26 except ImportError:
27 bootstrap_txt = urllib.urlopen('http://src.chromium.org/viewvc/chrome/' + 27 bootstrap_txt = urllib.urlopen('http://src.chromium.org/viewvc/chrome/' +
28 'trunk/src/tools/telemetry/tools/' + 28 'trunk/src/tools/telemetry/tools/' +
29 'telemetry_bootstrap.py').read() 29 'telemetry_bootstrap.py').read()
30 bootstrap = imp.new_module('bootstrap') 30 bootstrap = imp.new_module('bootstrap')
31 exec bootstrap_txt in bootstrap.__dict__ 31 exec bootstrap_txt in bootstrap.__dict__
32 bootstrap.DownloadDepsURL(os.path.join(os.path.dirname(__file__), 32 bootstrap.DownloadDepsURL(os.path.join(os.path.dirname(__file__),
33 BOOTSTRAPPED_FILES_DIR), 33 BOOTSTRAPPED_FILES_DIR),
34 module_deps_url) 34 module_deps_url)
35 35
36 36
37 if __name__ == '__main__': 37 if __name__ == '__main__':
38 bootstrapIfNeeded('perf_tools', 'src/tools/perf', 38 bootstrapIfNeeded('perf_tools', 'src/tools/perf',
39 'http://src.chromium.org/viewvc/chrome/trunk/src/tools/' + 39 'http://src.chromium.org/viewvc/chrome/trunk/src/tools/' +
40 'perf/perf_lib/bootstrap_deps') 40 'perf/perf_lib/bootstrap_deps')
41 import perf_tools 41 import perf_tools
42 from telemetry.page import multi_page_benchmark_runner 42 from telemetry.page import multi_page_benchmark_runner
43 benchmark_dir = os.path.join(os.path.dirname(__file__), 'perf_tools') 43 benchmark_dir = os.path.join(os.path.dirname(__file__), 'perf_tools')
44 sys.exit(multi_page_benchmark_runner.Main(benchmark_dir)) 44 sys.exit(multi_page_benchmark_runner.Main(benchmark_dir))
OLDNEW
« no previous file with comments | « content/test/gpu/run_gpu_tests ('k') | tools/telemetry/telemetry/page/page_test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698