Commit 4f02f4cd authored by thakis's avatar thakis Committed by Commit bot

Make `git cl try` to the same as hitting cq (except for presubmit).

PRESUBMIT.py used to contain a handwritten list of bots to trigger on
`git cl try`. It was always out of sync with what the cq did.
https://codereview.chromium.org/823823002 awesomely made `git cl try` do
the same thing as the commit queue, but it kept a few special-case rules around.

It's better to not have these special cases: Once the developer hits cq, all
the "intelligently" skipped bots need to be run anyways.  More importantly,
there should be only one system to decide what to run and it should be
identical for cq and `git cl try`.  Currently, we think this system is the
`analyze` step, and it does a decent job of that already.

BUG=none (but made possible by 443613)

Review URL: https://codereview.chromium.org/921323003

Cr-Commit-Position: refs/heads/master@{#317597}
parent 6377bfd7
...@@ -1744,29 +1744,6 @@ def GetPreferredTryMasters(project, change): ...@@ -1744,29 +1744,6 @@ def GetPreferredTryMasters(project, change):
import re import re
files = change.LocalPaths() files = change.LocalPaths()
if not files or all(re.search(r'[\\\/]OWNERS$', f) for f in files):
return {}
if all(re.search(r'\.(m|mm)$|(^|[\\\/_])mac[\\\/_.]', f) for f in files):
return GetDefaultTryConfigs([
'mac_chromium_compile_dbg_ng',
'mac_chromium_rel_ng',
])
if all(re.search('(^|[/_])win[/_.]', f) for f in files):
return GetDefaultTryConfigs([
'win8_chromium_rel',
'win_chromium_rel_ng',
'win_chromium_x64_rel_ng',
])
if all(re.search(r'(^|[\\\/_])android[\\\/_.]', f) and
not re.search(r'(^|[\\\/_])devtools[\\\/_.]', f) for f in files):
return GetDefaultTryConfigs([
'android_aosp',
'android_rel_tests_recipe',
])
if all(re.search(r'[\\\/_]ios[\\\/_.]', f) for f in files):
return GetDefaultTryConfigs(['ios_rel_device', 'ios_dbg_simulator'])
import os import os
import json import json
with open(os.path.join( with open(os.path.join(
...@@ -1787,10 +1764,4 @@ def GetPreferredTryMasters(project, change): ...@@ -1787,10 +1764,4 @@ def GetPreferredTryMasters(project, change):
if 'presubmit' in builder: if 'presubmit' in builder:
builders[master].pop(builder) builders[master].pop(builder)
# Match things like path/aura/file.cc and path/file_aura.cc.
# Same for chromeos.
if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files):
tryserver_linux = builders.setdefault('tryserver.chromium.linux', {})
tryserver_linux['linux_chromium_chromeos_asan_rel_ng'] = ['defaulttests']
return builders return builders
...@@ -375,14 +375,6 @@ class BadExtensionsTest(unittest.TestCase): ...@@ -375,14 +375,6 @@ class BadExtensionsTest(unittest.TestCase):
results = PRESUBMIT._CheckPatchFiles(mock_input_api, MockOutputApi()) results = PRESUBMIT._CheckPatchFiles(mock_input_api, MockOutputApi())
self.assertEqual(0, len(results)) self.assertEqual(0, len(results))
def testOnlyOwnersFiles(self):
mock_change = MockChange([
'some/path/OWNERS',
'A\Windows\Path\OWNERS',
])
results = PRESUBMIT.GetPreferredTryMasters(None, mock_change)
self.assertEqual({}, results)
class CheckSingletonInHeadersTest(unittest.TestCase): class CheckSingletonInHeadersTest(unittest.TestCase):
def testSingletonInArbitraryHeader(self): def testSingletonInArbitraryHeader(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment