Commit 6468afc2 authored by Garrett Beaty's avatar Garrett Beaty Committed by Commit Bot

Update the milo-based presubmits.

Split up the lint-luci-milo and generate_buildbot_json checks into
separate conditions, update the path to luci-milo.cfg to be in the
generated subdirectory and trigger the generate_buildbot_json check
on changes to luci-milo-dev.cfg.

Change-Id: Ideb1ab426619fb39d1ffe1da4ea8b60ecca4d949
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1877590
Auto-Submit: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: default avatarStephen Martinis <martiniss@chromium.org>
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708851}
parent 8c1be56b
...@@ -12,7 +12,7 @@ for more details on the presubmit API built into depot_tools. ...@@ -12,7 +12,7 @@ for more details on the presubmit API built into depot_tools.
def _CommonChecks(input_api, output_api): def _CommonChecks(input_api, output_api):
commands = [] commands = []
if ('infra/config/luci-milo.cfg' in input_api.LocalPaths() or if ('infra/config/generated/luci-milo.cfg' in input_api.LocalPaths() or
'infra/config/lint-luci-milo.py' in input_api.LocalPaths()): 'infra/config/lint-luci-milo.py' in input_api.LocalPaths()):
commands.append( commands.append(
input_api.Command( input_api.Command(
...@@ -20,9 +20,9 @@ def _CommonChecks(input_api, output_api): ...@@ -20,9 +20,9 @@ def _CommonChecks(input_api, output_api):
cmd=[input_api.python_executable, 'lint-luci-milo.py'], cmd=[input_api.python_executable, 'lint-luci-milo.py'],
kwargs={}, kwargs={},
message=output_api.PresubmitError)) message=output_api.PresubmitError))
if ('infra/config/generated/luci-milo.cfg' in input_api.LocalPaths() or
'infra/config/luci-milo-dev.cfg' in input_api.LocalPaths()):
commands.append( commands.append(
# Technically doesn't rely on lint-luci-milo.py, but is a lightweight
# enough check it should be fine to trigger.
input_api.Command( input_api.Command(
name='testing/buildbot config checks', name='testing/buildbot config checks',
cmd=[input_api.python_executable, input_api.os_path.join( cmd=[input_api.python_executable, input_api.os_path.join(
......
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