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

Side by Side Diff: tools/perf/chrome_telemetry_build/chromium_config.py

Issue 2573913002: Add devil dependencies config for performance tests.
Patch Set: Call devil_chromium.Initialize(...) from chromium_config module Created 4 years 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 | « tools/perf/chrome_telemetry_build/binary_dependencies.json ('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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium 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 logging 5 import logging
6 import os 6 import os
7 import sys 7 import sys
8 8
9 9
10 def GetChromiumSrcDir(): 10 def GetChromiumSrcDir():
11 return os.path.abspath( 11 return os.path.abspath(
12 os.path.join(os.path.abspath(__file__), '..', '..', '..', '..')) 12 os.path.join(os.path.abspath(__file__), '..', '..', '..', '..'))
13 13
14 14
15 def GetTelemetryDir(): 15 def GetTelemetryDir():
16 return os.path.join(GetChromiumSrcDir(), 'third_party', 'catapult', 16 return os.path.join(GetChromiumSrcDir(), 'third_party', 'catapult',
17 'telemetry') 17 'telemetry')
18 18
19 19
20 CLIENT_CONFIG_PATH = os.path.join( 20 CLIENT_CONFIG_PATH = os.path.join(
21 os.path.dirname(os.path.abspath(__file__)), 'binary_dependencies.json') 21 os.path.dirname(os.path.abspath(__file__)), 'binary_dependencies.json')
22 22
23 sys.path.insert(1, os.path.join(GetTelemetryDir())) 23 sys.path.insert(1, os.path.join(GetTelemetryDir()))
24 sys.path.insert(1, os.path.join(GetChromiumSrcDir(), 'build', 'android'))
24 25
25 from telemetry import project_config 26 from telemetry import project_config
27 from telemetry.core import util
28 import devil_chromium # pylint: disable=import-error
26 29
27 30
28 class ChromiumConfig(project_config.ProjectConfig): 31 class ChromiumConfig(project_config.ProjectConfig):
29 32
30 def __init__(self, top_level_dir=None, benchmark_dirs=None, 33 def __init__(self, top_level_dir=None, benchmark_dirs=None,
31 client_configs=None, 34 client_configs=None,
32 default_chrome_root=GetChromiumSrcDir()): 35 default_chrome_root=GetChromiumSrcDir()):
33 if client_configs is None: 36 if client_configs is None:
34 client_configs = [CLIENT_CONFIG_PATH] 37 client_configs = [CLIENT_CONFIG_PATH]
35 38
36 perf_dir = os.path.join(GetChromiumSrcDir(), 'tools', 'perf') 39 perf_dir = os.path.join(GetChromiumSrcDir(), 'tools', 'perf')
37 if not benchmark_dirs: 40 if not benchmark_dirs:
38 benchmark_dirs = [os.path.join(perf_dir, 'benchmarks')] 41 benchmark_dirs = [os.path.join(perf_dir, 'benchmarks')]
39 logging.info('No benchmark directories specified. Defaulting to %s', 42 logging.info('No benchmark directories specified. Defaulting to %s',
40 benchmark_dirs) 43 benchmark_dirs)
41 if not top_level_dir: 44 if not top_level_dir:
42 top_level_dir = perf_dir 45 top_level_dir = perf_dir
43 logging.info('No top level directory specified. Defaulting to %s', 46 logging.info('No top level directory specified. Defaulting to %s',
44 top_level_dir) 47 top_level_dir)
45 48
46 super(ChromiumConfig, self).__init__( 49 super(ChromiumConfig, self).__init__(
47 top_level_dir=top_level_dir, benchmark_dirs=benchmark_dirs, 50 top_level_dir=top_level_dir, benchmark_dirs=benchmark_dirs,
48 client_configs=client_configs, default_chrome_root=default_chrome_root) 51 client_configs=client_configs, default_chrome_root=default_chrome_root)
52
53 for chromium_out_dir in util.GetBuildDirectories():
54 if os.path.exists(chromium_out_dir):
55 # pylint: disable=undefined-variable
56 devil_chromium.Initialize(output_directory=chromium_out_dir)
nednguyen 2017/01/20 16:02:11 Hmhh, what is this for?
jbudorick 2017/01/20 16:04:54 This tells devil where to find local build product
nednguyen 2017/01/20 16:08:50 It either already be done in https://github.com/ca
57 break
OLDNEW
« no previous file with comments | « tools/perf/chrome_telemetry_build/binary_dependencies.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698