Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1004)

Side by Side Diff: PRESUBMIT.py

Issue 2489523003: Remove GetPreferredTryMasters from PRESUBMIT. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
10 import os 9 import os
11 import platform
12 import re 10 import re
13 import subprocess
14 import sys 11 import sys
15 12
16 13
17 # Directories that will be scanned by cpplint by the presubmit script. 14 # Directories that will be scanned by cpplint by the presubmit script.
18 CPPLINT_DIRS = [ 15 CPPLINT_DIRS = [
19 'webrtc/audio', 16 'webrtc/audio',
20 'webrtc/call', 17 'webrtc/call',
21 'webrtc/common_video', 18 'webrtc/common_video',
22 'webrtc/examples', 19 'webrtc/examples',
23 'webrtc/modules/audio_mixer', 20 'webrtc/modules/audio_mixer',
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 input_api, output_api)) 609 input_api, output_api))
613 results.extend(input_api.canned_checks.CheckChangeHasDescription( 610 results.extend(input_api.canned_checks.CheckChangeHasDescription(
614 input_api, output_api)) 611 input_api, output_api))
615 results.extend(_CheckChangeHasBugField(input_api, output_api)) 612 results.extend(_CheckChangeHasBugField(input_api, output_api))
616 results.extend(input_api.canned_checks.CheckChangeHasTestField( 613 results.extend(input_api.canned_checks.CheckChangeHasTestField(
617 input_api, output_api)) 614 input_api, output_api))
618 results.extend(input_api.canned_checks.CheckTreeIsOpen( 615 results.extend(input_api.canned_checks.CheckTreeIsOpen(
619 input_api, output_api, 616 input_api, output_api,
620 json_url='http://webrtc-status.appspot.com/current?format=json')) 617 json_url='http://webrtc-status.appspot.com/current?format=json'))
621 return results 618 return results
622
623
624 # pylint: disable=W0613
625 def GetPreferredTryMasters(project, change):
626 cq_config_path = os.path.join(
627 change.RepositoryRoot(), 'infra', 'config', 'cq.cfg')
628 # commit_queue.py below is a script in depot_tools directory, which has a
629 # 'builders' command to retrieve a list of CQ builders from the CQ config.
630 is_win = platform.system() == 'Windows'
631 masters = json.loads(subprocess.check_output(
632 ['commit_queue', 'builders', cq_config_path], shell=is_win))
633
634 try_config = {}
635 for master in masters:
636 try_config.setdefault(master, {})
637 for builder in masters[master]:
638 if 'presubmit' in builder:
639 # Do not trigger presubmit builders, since they're likely to fail
640 # (e.g. OWNERS checks before finished code review), and we're running
641 # local presubmit anyway.
642 pass
643 else:
644 try_config[master][builder] = ['defaulttests']
645
646 return try_config
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698