Commit 28e2cb1f authored by Peter Mayo's avatar Peter Mayo Committed by Commit Bot

[BGPT] Autosubmit BGPT change to BGPT bot

When we change the expectations for tests with --enable-blink-gen-property-trees
let's make it easy to include the the right try bot to make sure it is accurate.

Bug: 836884
Change-Id: I14a5b274754fd51cee4400ebd1acbdd67f97d571
Reviewed-on: https://chromium-review.googlesource.com/1162620
Commit-Queue: Peter Mayo <petermayo@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583105}
parent 54b245ad
...@@ -91,6 +91,21 @@ def _ArePaintOrCompositingDirectoriesModified(change): # pylint: disable=C0103 ...@@ -91,6 +91,21 @@ def _ArePaintOrCompositingDirectoriesModified(change): # pylint: disable=C0103
return False return False
def __ArePropertyTreeGenerationExpectationsModified(change): # pylint: disable=C0103
"""Checks whether CL has changes to paint or compositing directories."""
interesting_paths = [
os.path.join('third_party', 'WebKit', 'LayoutTests', 'FlagExpectations',
'enable-blink-gen-property-trees'),
os.path.join('third_party', 'WebKit', 'LayoutTests', 'flag-specific',
'enable-blink-gen-property-trees'),
]
for affected_file in change.AffectedFiles():
file_path = affected_file.LocalPath()
if any(x in file_path for x in interesting_paths):
return True
return False
def _AreLayoutNGDirectoriesModified(change): # pylint: disable=C0103 def _AreLayoutNGDirectoriesModified(change): # pylint: disable=C0103
"""Checks whether CL has changes to a layout ng directory.""" """Checks whether CL has changes to a layout ng directory."""
layout_ng_paths = [ layout_ng_paths = [
...@@ -128,6 +143,12 @@ def PostUploadHook(cl, change, output_api): # pylint: disable=C0103 ...@@ -128,6 +143,12 @@ def PostUploadHook(cl, change, output_api): # pylint: disable=C0103
'Automatically added linux_layout_tests_slimming_paint_v2 and ' 'Automatically added linux_layout_tests_slimming_paint_v2 and '
'linux_trusty_blink_rel to run on CQ due to changes in paint or ' 'linux_trusty_blink_rel to run on CQ due to changes in paint or '
'compositing directories.')) 'compositing directories.'))
if __ArePropertyTreeGenerationExpectationsModified(change):
results.extend(output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
['luci.chromium.try:linux-blink-gen-property-trees'],
'Automatically added linux-blink-gen-property-trees and '
'run on CQ due to changes in expectations'))
if _AreLayoutNGDirectoriesModified(change): if _AreLayoutNGDirectoriesModified(change):
results.extend(output_api.EnsureCQIncludeTrybotsAreAdded( results.extend(output_api.EnsureCQIncludeTrybotsAreAdded(
cl, cl,
......
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