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

Side by Side Diff: PRESUBMIT.py

Issue 1620343003: src/PRESUBMIT.py: do not trigger experimental or triggered builders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: even simpler Created 4 years, 11 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 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 results.extend(input_api.canned_checks.CheckTreeIsOpen( 1944 results.extend(input_api.canned_checks.CheckTreeIsOpen(
1945 input_api, 1945 input_api,
1946 output_api, 1946 output_api,
1947 json_url='http://chromium-status.appspot.com/current?format=json')) 1947 json_url='http://chromium-status.appspot.com/current?format=json'))
1948 1948
1949 results.extend(input_api.canned_checks.CheckChangeHasBugField( 1949 results.extend(input_api.canned_checks.CheckChangeHasBugField(
1950 input_api, output_api)) 1950 input_api, output_api))
1951 results.extend(input_api.canned_checks.CheckChangeHasDescription( 1951 results.extend(input_api.canned_checks.CheckChangeHasDescription(
1952 input_api, output_api)) 1952 input_api, output_api))
1953 return results 1953 return results
1954
1955
1956 def GetPreferredTryMasters(project, change):
1957 import json
1958 import os.path
1959 import platform
1960 import subprocess
1961
1962 cq_config_path = os.path.join(
1963 change.RepositoryRoot(), 'infra', 'config', 'cq.cfg')
1964 # commit_queue.py below is a script in depot_tools directory, which has a
1965 # 'builders' command to retrieve a list of CQ builders from the CQ config.
1966 is_win = platform.system() == 'Windows'
1967 masters = json.loads(subprocess.check_output(
1968 ['commit_queue', 'builders', cq_config_path], shell=is_win))
1969
1970 try_config = {}
1971 for master in masters:
1972 try_config.setdefault(master, {})
1973 for builder in masters[master]:
1974 # Do not trigger presubmit builders, since they're likely to fail
1975 # (e.g. OWNERS checks before finished code review), and we're
1976 # running local presubmit anyway.
1977 if 'presubmit' not in builder:
1978 try_config[master][builder] = ['defaulttests']
1979
1980 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