OLD | NEW |
---|---|
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 os | 5 import os |
6 import sys | |
6 | 7 |
7 | 8 |
8 def GetChromiumSrcDir(): | 9 def GetChromiumSrcDir(): |
9 return os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname( | 10 return os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname( |
10 os.path.abspath(__file__))))) | 11 os.path.abspath(__file__))))) |
11 | 12 |
13 | |
14 def GetCatapultBaseDir(): | |
15 return os.path.join( | |
16 GetChromiumSrcDir(), 'third_party', 'catapult', 'catapult_base') | |
17 | |
18 | |
12 def GetTelemetryDir(): | 19 def GetTelemetryDir(): |
13 return os.path.join(GetChromiumSrcDir(), 'tools', 'telemetry') | 20 return os.path.join(GetChromiumSrcDir(), 'tools', 'telemetry') |
14 | 21 |
22 | |
15 def GetPerfDir(): | 23 def GetPerfDir(): |
16 return os.path.join(GetChromiumSrcDir(), 'tools', 'perf') | 24 return os.path.join(GetChromiumSrcDir(), 'tools', 'perf') |
17 | 25 |
26 | |
18 def GetPerfStorySetsDir(): | 27 def GetPerfStorySetsDir(): |
19 return os.path.join(GetPerfDir(), 'page_sets') | 28 return os.path.join(GetPerfDir(), 'page_sets') |
20 | 29 |
30 | |
21 def GetPerfBenchmarksDir(): | 31 def GetPerfBenchmarksDir(): |
22 return os.path.join(GetPerfDir(), 'benchmarks') | 32 return os.path.join(GetPerfDir(), 'benchmarks') |
23 | 33 |
34 | |
35 def AddTelemetryToPath(): | |
36 telemetry_path = GetTelemetryDir() | |
37 if telemetry_path not in sys.path: | |
38 sys.path.insert(1, telemetry_path) | |
39 | |
40 | |
41 def AddCatapultBaseToPath(): | |
42 catapult_base_path = GetCatapultBaseDir() | |
43 if catapult_base_path not in sys.path: | |
44 sys.path.insert(1, catapult_base_path) | |
eakuefner
2016/01/08 19:54:54
If you do client_config in this CL, you can add he
aiolos (Not reviewing)
2016/01/08 20:25:27
Do we actually need that? That path gets passed in
eakuefner
2016/01/08 20:31:22
Oh, I see. I didn't realize that ChromiumConfig wo
| |
OLD | NEW |