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 # TODO(eakuefner): Remove this test once Telemetry lives in Catapult. | |
5 import json | 6 import json |
6 import os | 7 import os |
7 import platform | 8 import platform |
8 import sys | 9 import sys |
9 import unittest | 10 import unittest |
10 | 11 |
11 from telemetry.internal.util import find_dependencies | |
12 from telemetry.internal.util import path | 12 from telemetry.internal.util import path |
13 | 13 |
14 from core import find_dependencies | |
14 | 15 |
15 _TELEMETRY_DEPS_PATH = os.path.join( | 16 _TELEMETRY_DEPS_PATH = os.path.join( |
16 path.GetTelemetryDir(), 'telemetry', 'TELEMETRY_DEPS') | 17 path.GetTelemetryDir(), 'telemetry', 'TELEMETRY_DEPS') |
nednguyen
2015/11/23 22:52:05
Also move TELEMETRY_DEPS to tools/perf?
aiolos (Not reviewing)
2015/11/23 22:53:25
+1
eakuefner
2015/11/23 23:29:09
Done. I moved the salient contents of the file int
| |
17 | 18 |
18 | 19 |
19 def _GetCurrentTelemetryDependencies(): | 20 def _GetCurrentTelemetryDependencies(): |
20 parser = find_dependencies.FindDependenciesCommand.CreateParser() | 21 parser = find_dependencies.FindDependenciesCommand.CreateParser() |
21 find_dependencies.FindDependenciesCommand.AddCommandLineArgs(parser, None) | 22 find_dependencies.FindDependenciesCommand.AddCommandLineArgs(parser, None) |
22 options, args = parser.parse_args(['']) | 23 options, args = parser.parse_args(['']) |
23 options.positional_args = args | 24 options.positional_args = args |
24 return find_dependencies.FindDependencies([], options=options) | 25 return find_dependencies.FindDependencies([], options=options) |
25 | 26 |
26 | 27 |
(...skipping 29 matching lines...) Expand all Loading... | |
56 # crbug.com/522335 | 57 # crbug.com/522335 |
57 if extra_dep_paths: | 58 if extra_dep_paths: |
58 if platform.system() != 'Darwin': | 59 if platform.system() != 'Darwin': |
59 self.fail( | 60 self.fail( |
60 'Your patch adds new dependencies to telemetry. Please contact ' | 61 'Your patch adds new dependencies to telemetry. Please contact ' |
61 'aiolos@,dtu@, or nednguyen@ on how to proceed with this change. ' | 62 'aiolos@,dtu@, or nednguyen@ on how to proceed with this change. ' |
62 'Extra dependencies:\n%s' % '\n'.join(extra_dep_paths)) | 63 'Extra dependencies:\n%s' % '\n'.join(extra_dep_paths)) |
63 else: | 64 else: |
64 print ('Dependencies check failed on mac platform. Extra deps: %s\n' | 65 print ('Dependencies check failed on mac platform. Extra deps: %s\n' |
65 ' sys.path: %s' % (extra_dep_paths, sys.path)) | 66 ' sys.path: %s' % (extra_dep_paths, sys.path)) |
OLD | NEW |