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

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

Issue 2823063003: Revert of [tools/perf] Remove default values of benchmark_dirs and top_level_dir in chromium_config module (Closed)
Patch Set: Created 3 years, 8 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 | tools/perf/core/path_util.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 # 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 os 6 import os
7 import sys
6 8
7 from core import path_util 9
10 def GetChromiumSrcDir():
11 return os.path.abspath(
12 os.path.join(os.path.abspath(__file__), '..', '..', '..', '..'))
13
14
15 def GetTelemetryDir():
16 return os.path.join(GetChromiumSrcDir(), 'third_party', 'catapult',
17 'telemetry')
8 18
9 19
10 CLIENT_CONFIG_PATH = os.path.join( 20 CLIENT_CONFIG_PATH = os.path.join(
11 os.path.dirname(os.path.abspath(__file__)), 'binary_dependencies.json') 21 os.path.dirname(os.path.abspath(__file__)), 'binary_dependencies.json')
12 22
13 path_util.AddTelemetryToPath() 23 sys.path.insert(1, os.path.join(GetTelemetryDir()))
14 24
15 from telemetry import project_config 25 from telemetry import project_config
16 26
17 27
18 class ChromiumConfig(project_config.ProjectConfig): 28 class ChromiumConfig(project_config.ProjectConfig):
19 29
20 def __init__(self, top_level_dir=None, benchmark_dirs=None, 30 def __init__(self, top_level_dir=None, benchmark_dirs=None,
21 client_configs=None, default_chrome_root=None): 31 client_configs=None,
32 default_chrome_root=GetChromiumSrcDir()):
22 if client_configs is None: 33 if client_configs is None:
23 client_configs = [CLIENT_CONFIG_PATH] 34 client_configs = [CLIENT_CONFIG_PATH]
24 if default_chrome_root is None: 35
25 default_chrome_root = path_util.GetChromiumSrcDir() 36 perf_dir = os.path.join(GetChromiumSrcDir(), 'tools', 'perf')
37 if not benchmark_dirs:
38 benchmark_dirs = [os.path.join(perf_dir, 'benchmarks')]
39 logging.info('No benchmark directories specified. Defaulting to %s',
40 benchmark_dirs)
41 if not top_level_dir:
42 top_level_dir = perf_dir
43 logging.info('No top level directory specified. Defaulting to %s',
44 top_level_dir)
26 45
27 super(ChromiumConfig, self).__init__( 46 super(ChromiumConfig, self).__init__(
28 top_level_dir=top_level_dir, benchmark_dirs=benchmark_dirs, 47 top_level_dir=top_level_dir, benchmark_dirs=benchmark_dirs,
29 client_configs=client_configs, default_chrome_root=default_chrome_root) 48 client_configs=client_configs, default_chrome_root=default_chrome_root)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/core/path_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698