| 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 # TODO(eakuefner): Remove this test once Telemetry lives in Catapult. |
| 6 import os | 6 import os |
| 7 import platform | 7 import platform |
| 8 import sys | 8 import sys |
| 9 import unittest | 9 import unittest |
| 10 | 10 |
| 11 from telemetry.internal.util import path | 11 from telemetry.internal.util import path |
| 12 | 12 |
| 13 from core import find_dependencies | 13 from core import find_dependencies |
| 14 from core import path_util | 14 from core import path_util |
| 15 | 15 |
| 16 _TELEMETRY_DEPS = [ | 16 _TELEMETRY_DEPS = [ |
| 17 'third_party/catapult/', | 17 'third_party/catapult/', |
| 18 'tools/telemetry/'] | 18 ] |
| 19 | 19 |
| 20 | 20 |
| 21 def _GetCurrentTelemetryDependencies(): | 21 def _GetCurrentTelemetryDependencies(): |
| 22 parser = find_dependencies.FindDependenciesCommand.CreateParser() | 22 parser = find_dependencies.FindDependenciesCommand.CreateParser() |
| 23 find_dependencies.FindDependenciesCommand.AddCommandLineArgs(parser, None) | 23 find_dependencies.FindDependenciesCommand.AddCommandLineArgs(parser, None) |
| 24 options, args = parser.parse_args(['']) | 24 options, args = parser.parse_args(['']) |
| 25 options.positional_args = args | 25 options.positional_args = args |
| 26 return find_dependencies.FindDependencies([], options=options) | 26 return find_dependencies.FindDependencies([], options=options) |
| 27 | 27 |
| 28 | 28 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 53 if platform.system() != 'Darwin': | 53 if platform.system() != 'Darwin': |
| 54 self.fail( | 54 self.fail( |
| 55 'Your patch adds new dependencies to telemetry. Please contact ' | 55 'Your patch adds new dependencies to telemetry. Please contact ' |
| 56 'aiolos@,dtu@, or nednguyen@ on how to proceed with this change. ' | 56 'aiolos@,dtu@, or nednguyen@ on how to proceed with this change. ' |
| 57 'Extra dependencies:\n%s' % '\n'.join(extra_dep_paths)) | 57 'Extra dependencies:\n%s' % '\n'.join(extra_dep_paths)) |
| 58 else: | 58 else: |
| 59 print ('Dependencies check failed on mac platform. Extra deps: %s\n' | 59 print ('Dependencies check failed on mac platform. Extra deps: %s\n' |
| 60 ' sys.path: %s' % (extra_dep_paths, sys.path)) | 60 ' sys.path: %s' % (extra_dep_paths, sys.path)) |
| 61 except ImportError: # crbug.com/559527 | 61 except ImportError: # crbug.com/559527 |
| 62 pass | 62 pass |
| OLD | NEW |