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

Side by Side Diff: PRESUBMIT.py

Issue 1020973003: Make git cl try work in light of the new CQ config.json format (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 9 months 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 Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into depot_tools. 8 for more details about the presubmit API built into depot_tools.
9 """ 9 """
10 10
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1742 1742
1743 def GetPreferredTryMasters(project, change): 1743 def GetPreferredTryMasters(project, change):
1744 import re 1744 import re
1745 files = change.LocalPaths() 1745 files = change.LocalPaths()
1746 1746
1747 import os 1747 import os
1748 import json 1748 import json
1749 with open(os.path.join( 1749 with open(os.path.join(
1750 change.RepositoryRoot(), 'testing', 'commit_queue', 'config.json')) as f: 1750 change.RepositoryRoot(), 'testing', 'commit_queue', 'config.json')) as f:
1751 cq_config = json.load(f) 1751 cq_config = json.load(f)
1752 cq_trybots = cq_config.get('trybots', {}) 1752 cq_verifiers = cq_config.get('verifiers_no_patch', {})
1753 builders = cq_trybots.get('launched', {}) 1753 cq_try_jobs = cq_verifiers.get('try_job_verifier', {})
1754 for master, master_config in cq_trybots.get('triggered', {}).iteritems(): 1754 builders = cq_try_jobs.get('launched', {})
1755
1756 for master, master_config in cq_try_jobs.get('triggered', {}).iteritems():
1755 for triggered_bot in master_config: 1757 for triggered_bot in master_config:
1756 builders.get(master, {}).pop(triggered_bot, None) 1758 builders.get(master, {}).pop(triggered_bot, None)
1757 1759
1758 # Explicitly iterate over copies of dicts since we mutate them. 1760 # Explicitly iterate over copies of dicts since we mutate them.
1759 for master in builders.keys(): 1761 for master in builders.keys():
1760 for builder in builders[master].keys(): 1762 for builder in builders[master].keys():
1761 # Do not trigger presubmit builders, since they're likely to fail 1763 # Do not trigger presubmit builders, since they're likely to fail
1762 # (e.g. OWNERS checks before finished code review), and we're 1764 # (e.g. OWNERS checks before finished code review), and we're
1763 # running local presubmit anyway. 1765 # running local presubmit anyway.
1764 if 'presubmit' in builder: 1766 if 'presubmit' in builder:
1765 builders[master].pop(builder) 1767 builders[master].pop(builder)
1766 1768
1767 return builders 1769 return builders
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