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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 Returns: | 293 Returns: |
294 True if blink, false if webkit. | 294 True if blink, false if webkit. |
295 """ | 295 """ |
296 git_cmd = ['cat-file', 'blob', '%s:%s' %(git_revision, FILE_DEPS_GIT)] | 296 git_cmd = ['cat-file', 'blob', '%s:%s' %(git_revision, FILE_DEPS_GIT)] |
297 search_str = 'blink.git' | 297 search_str = 'blink.git' |
298 search_key = 'webkit_url' | 298 search_key = 'webkit_url' |
299 (out_put, ret_val) = RunGit(git_cmd) | 299 (out_put, ret_val) = RunGit(git_cmd) |
300 if ret_val: | 300 if ret_val: |
301 search_str = 'blink' | 301 search_str = 'blink' |
302 search_key = 'webkit_trunk' | 302 search_key = 'webkit_trunk' |
303 git_cmd = ['cat-file', 'blob', '%s:%s' %(git_revision, 'FILE_DEPS')] | 303 git_cmd = ['cat-file', 'blob', '%s:%s' %(git_revision, FILE_DEPS)] |
304 (out_put, ret_val) = RunGit(git_cmd) | 304 (out_put, ret_val) = RunGit(git_cmd) |
305 if ret_val: | 305 if ret_val: |
306 print 'Error processing DEPS or .DEPS.git' | 306 print 'Error processing DEPS or .DEPS.git' |
307 return False | 307 return False |
308 locals = { | 308 locals = { |
309 'Var': lambda _: locals["vars"][_], | 309 'Var': lambda _: locals["vars"][_], |
310 'From': lambda *args: None | 310 'From': lambda *args: None |
311 } | 311 } |
312 | 312 |
313 exec out_put in {}, locals | 313 exec out_put in {}, locals |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 return sys.platform.startswith('linux') | 606 return sys.platform.startswith('linux') |
607 | 607 |
608 | 608 |
609 def IsMacHost(): | 609 def IsMacHost(): |
610 """Checks whether or not the script is running on Mac. | 610 """Checks whether or not the script is running on Mac. |
611 | 611 |
612 Returns: | 612 Returns: |
613 True if running on Mac. | 613 True if running on Mac. |
614 """ | 614 """ |
615 return sys.platform.startswith('darwin') | 615 return sys.platform.startswith('darwin') |
OLD | NEW |