OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 """Utility functions used by the bisect tool. | 5 """Utility functions used by the bisect tool. |
6 | 6 |
7 This includes functions related to checking out the depot and outputting | 7 This includes functions related to checking out the depot and outputting |
8 annotations for the Buildbot waterfall. | 8 annotations for the Buildbot waterfall. |
9 """ | 9 """ |
10 | 10 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 extra_src = imp.load_source('data', path_to_file) | 251 extra_src = imp.load_source('data', path_to_file) |
252 GCLIENT_SPEC_DATA = extra_src.GetGClientSpec() | 252 GCLIENT_SPEC_DATA = extra_src.GetGClientSpec() |
253 GCLIENT_SPEC_ANDROID = extra_src.GetGClientSpecExtraParams() | 253 GCLIENT_SPEC_ANDROID = extra_src.GetGClientSpecExtraParams() |
254 return extra_src | 254 return extra_src |
255 except ImportError: | 255 except ImportError: |
256 return None | 256 return None |
257 | 257 |
258 | 258 |
259 def IsTelemetryCommand(command): | 259 def IsTelemetryCommand(command): |
260 """Attempts to discern whether or not a given command is running telemetry.""" | 260 """Attempts to discern whether or not a given command is running telemetry.""" |
261 return ('tools/perf/run_' in command or 'tools\\perf\\run_' in command) | 261 return 'tools/perf/run_' in command or 'tools\\perf\\run_' in command |
262 | 262 |
263 | 263 |
264 def _CreateAndChangeToSourceDirectory(working_directory): | 264 def _CreateAndChangeToSourceDirectory(working_directory): |
265 """Creates a directory 'bisect' as a subdirectory of |working_directory|. | 265 """Creates a directory 'bisect' as a subdirectory of |working_directory|. |
266 | 266 |
267 If successful, the current working directory will be changed to the new | 267 If successful, the current working directory will be changed to the new |
268 'bisect' directory. | 268 'bisect' directory. |
269 | 269 |
270 Args: | 270 Args: |
271 working_directory: The directory to create the new 'bisect' directory in. | 271 working_directory: The directory to create the new 'bisect' directory in. |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 platform = os.environ.get('PROCESSOR_ARCHITECTURE') | 622 platform = os.environ.get('PROCESSOR_ARCHITECTURE') |
623 return platform and platform in ['AMD64', 'I64'] | 623 return platform and platform in ['AMD64', 'I64'] |
624 | 624 |
625 | 625 |
626 def IsLinuxHost(): | 626 def IsLinuxHost(): |
627 return sys.platform.startswith('linux') | 627 return sys.platform.startswith('linux') |
628 | 628 |
629 | 629 |
630 def IsMacHost(): | 630 def IsMacHost(): |
631 return sys.platform.startswith('darwin') | 631 return sys.platform.startswith('darwin') |
OLD | NEW |