OLD | NEW |
1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import json | 9 import json |
10 import os | 10 import os |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 input_api, output_api)) | 331 input_api, output_api)) |
332 results.extend(input_api.canned_checks.CheckTreeIsOpen( | 332 results.extend(input_api.canned_checks.CheckTreeIsOpen( |
333 input_api, output_api, | 333 input_api, output_api, |
334 json_url='http://webrtc-status.appspot.com/current?format=json')) | 334 json_url='http://webrtc-status.appspot.com/current?format=json')) |
335 return results | 335 return results |
336 | 336 |
337 | 337 |
338 # pylint: disable=W0613 | 338 # pylint: disable=W0613 |
339 def GetPreferredTryMasters(project, change): | 339 def GetPreferredTryMasters(project, change): |
340 cq_config_path = os.path.join( | 340 cq_config_path = os.path.join( |
341 change.RepositoryRoot(), 'infra', 'config', 'cq.cfg') | 341 change.RepositoryRoot(), 'infra', 'config', 'cq_disabled.cfg') |
342 # commit_queue.py below is a script in depot_tools directory, which has a | 342 # commit_queue.py below is a script in depot_tools directory, which has a |
343 # 'builders' command to retrieve a list of CQ builders from the CQ config. | 343 # 'builders' command to retrieve a list of CQ builders from the CQ config. |
344 is_win = platform.system() == 'Windows' | 344 is_win = platform.system() == 'Windows' |
345 masters = json.loads(subprocess.check_output( | 345 masters = json.loads(subprocess.check_output( |
346 ['commit_queue', 'builders', cq_config_path], shell=is_win)) | 346 ['commit_queue', 'builders', cq_config_path], shell=is_win)) |
347 | 347 |
348 try_config = {} | 348 try_config = {} |
349 for master in masters: | 349 for master in masters: |
350 try_config.setdefault(master, {}) | 350 try_config.setdefault(master, {}) |
351 for builder in masters[master]: | 351 for builder in masters[master]: |
352 if 'presubmit' in builder: | 352 if 'presubmit' in builder: |
353 # Do not trigger presubmit builders, since they're likely to fail | 353 # Do not trigger presubmit builders, since they're likely to fail |
354 # (e.g. OWNERS checks before finished code review), and we're running | 354 # (e.g. OWNERS checks before finished code review), and we're running |
355 # local presubmit anyway. | 355 # local presubmit anyway. |
356 pass | 356 pass |
357 else: | 357 else: |
358 try_config[master][builder] = ['defaulttests'] | 358 try_config[master][builder] = ['defaulttests'] |
359 | 359 |
360 return try_config | 360 return try_config |
OLD | NEW |