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

Side by Side Diff: third_party/WebKit/PRESUBMIT.py

Issue 2854783002: Re-land: Trigger linux_layout_tests_layout_ng for LayoutNG changes (Closed)
Patch Set: Created 3 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 Blink. 5 """Top-level presubmit script for Blink.
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 gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 'compositing'), 287 'compositing'),
288 os.path.join('third_party', 'WebKit', 'Source', 'core', 'paint'), 288 os.path.join('third_party', 'WebKit', 'Source', 'core', 'paint'),
289 ] 289 ]
290 for affected_file in change.AffectedFiles(): 290 for affected_file in change.AffectedFiles():
291 file_path = affected_file.LocalPath() 291 file_path = affected_file.LocalPath()
292 if any(x in file_path for x in paint_or_compositing_paths): 292 if any(x in file_path for x in paint_or_compositing_paths):
293 return True 293 return True
294 return False 294 return False
295 295
296 296
297 def _AreLayoutNGDirectoriesModified(change): # pylint: disable=C0103
298 """Checks whether CL has changes to a layout ng directory."""
299 layout_ng_paths = [
300 os.path.join('third_party', 'WebKit', 'Source', 'core', 'layout',
301 'ng'),
302 ]
303 for affected_file in change.AffectedFiles():
304 file_path = affected_file.LocalPath()
305 if any(x in file_path for x in layout_ng_paths):
306 return True
307 return False
308
309
297 def PostUploadHook(cl, change, output_api): # pylint: disable=C0103 310 def PostUploadHook(cl, change, output_api): # pylint: disable=C0103
298 """git cl upload will call this hook after the issue is created/modified. 311 """git cl upload will call this hook after the issue is created/modified.
299 312
300 This hook adds extra try bots to the CL description in order to run slimming 313 This hook adds extra try bots to the CL description in order to run slimming
301 paint v2 tests in addition to the CQ try bots if the change contains paint 314 paint v2 tests or LayoutNG tests in addition to the CQ try bots if the
302 or compositing changes (see: _ArePaintOrCompositingDirectoriesModified). For 315 change contains changes in a relevant direcotry (see:
303 more information about slimming-paint-v2 tests see https://crbug.com/601275. 316 _ArePaintOrCompositingDirectoriesModified and
317 _AreLayoutNGDirectoriesModified). For more information about
318 slimming-paint-v2 tests see https://crbug.com/601275 and for information
319 about the LayoutNG tests see https://crbug.com/706183.
304 """ 320 """
305 if not _ArePaintOrCompositingDirectoriesModified(change): 321 results = []
306 return [] 322 if _ArePaintOrCompositingDirectoriesModified(change):
307 return output_api.EnsureCQIncludeTrybotsAreAdded( 323 results.extend(output_api.EnsureCQIncludeTrybotsAreAdded(
308 cl, 324 cl,
309 ['master.tryserver.chromium.linux:' 325 ['master.tryserver.chromium.linux:'
310 'linux_layout_tests_slimming_paint_v2'], 326 'linux_layout_tests_slimming_paint_v2'],
311 'Automatically added slimming-paint-v2 tests to run on CQ due to ' 327 'Automatically added slimming-paint-v2 tests to run on CQ due to '
312 'changes in paint or compositing directories.') 328 'changes in paint or compositing directories.'))
329 if _AreLayoutNGDirectoriesModified(change):
330 results.extend(output_api.EnsureCQIncludeTrybotsAreAdded(
331 cl,
332 ['master.tryserver.chromium.linux:'
333 'linux_layout_tests_layout_ng'],
334 'Automatically added linux_layout_tests_layout_ng to run on CQ due '
335 'to changes in LayoutNG directories.'))
336 return results
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