Commit 35bdc0f5 authored by Edward Lemur's avatar Edward Lemur Committed by Commit Bot

PRESUBMIT.py: Remove uses of EnsureCQIncludeTrybotsAreAdded.

The functionality was moved to cq.cfg in
https://chromium-review.googlesource.com/c/chromium/src/+/1265735

Bug: 881860
Change-Id: I839784ec7babfa095272ab06c4c21c1e57475216
Reviewed-on: https://chromium-review.googlesource.com/c/1266055Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600875}
parent 49642113
# Copyright (c) 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for //build.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra tests.
"""
def affects_gn_checker(f):
return 'check_gn_headers' in f.LocalPath()
if not change.AffectedFiles(file_filter=affects_gn_checker):
return []
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_chromium_dbg_ng',
],
'Automatically added tests to run on CQ.')
......@@ -287,17 +287,3 @@ def CheckChangeOnUpload(input_api, output_api):
results += CheckForUseOfWrongClock(input_api, output_api)
results += FindUselessIfdefs(input_api, output_api)
return results
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook adds an extra try bot list to the CL description in order to run
Blink tests and additional GPU tests in addition to the CQ try bots.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'master.tryserver.blink:linux_trusty_blink_rel',
'luci.chromium.try:android_optional_gpu_tests_rel',
],
'Automatically added Blink and Android GPU trybots for CQ.')
......@@ -39,28 +39,3 @@ def CheckChangeOnCommit(input_api, output_api):
results = []
results.extend(_CheckChangeLintsClean(input_api, output_api))
return results
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, the WebGL 2.0 conformance tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
Also, it compiles the Linux VR tryserver to compile the UI testapp.
When adding/removing tests here, ensure that both gpu/PRESUBMIT.py and
ui/gl/PRESUBMIT.py are updated.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_optional_gpu_tests_rel',
'luci.chromium.try:mac_optional_gpu_tests_rel',
'luci.chromium.try:win_optional_gpu_tests_rel',
'luci.chromium.try:android_optional_gpu_tests_rel',
'luci.chromium.try:linux_vr',
],
'Automatically added optional GPU tests to run on CQ.')
......@@ -77,24 +77,6 @@ def _RunToolsUnittests(input_api, output_api):
input_api, output_api, '.', [ r'^tools_unittest\.py$'])
def _ChangeAffectsCronetForAndroid(change):
""" Returns |true| if the change may affect Cronet for Android. """
for path in change.LocalPaths():
if not path.startswith(os.path.join('components', 'cronet', 'ios')):
return True
return False
def _ChangeAffectsCronetForIos(change):
""" Returns |true| if the change may affect Cronet for iOS. """
for path in change.LocalPaths():
if not path.startswith(os.path.join('components', 'cronet', 'android')):
return True
return False
def _ChangeAffectsCronetTools(change):
""" Returns |true| if the change may affect Cronet tools. """
......@@ -115,20 +97,3 @@ def CheckChangeOnUpload(input_api, output_api):
def CheckChangeOnCommit(input_api, output_api):
return _RunToolsUnittests(input_api, output_api)
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook adds an extra try bot to the CL description in order to run Cronet
tests in addition to CQ try bots.
"""
try_bots = []
if _ChangeAffectsCronetForAndroid(change):
try_bots.append('master.tryserver.chromium.android:android_cronet_tester')
if _ChangeAffectsCronetForIos(change):
try_bots.append('luci.chromium.try:ios-simulator-cronet')
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl, try_bots, 'Automatically added Cronet trybots to run tests on CQ.')
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for components/grpc_support/.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook adds an extra line to the CL description in order to run Cronet
tests in addition to CQ bots.
"""
# TODO(https://crbug.com/712733): Remove this once Cronet bots are deployed on CQ.
try_bots = ['master.tryserver.chromium.android:android_cronet_tester',
'luci.chromium.try:ios-simulator-cronet']
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl, try_bots, 'Automatically added Cronet trybots to run tests on CQ.')
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
def PostUploadHook(cl, change, output_api):
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:closure_compilation',
],
'Automatically added optional Closure bots to run on CQ.')
......@@ -14,21 +14,3 @@ def CheckChangeOnUpload(input_api, output_api):
import presubmit_checks as ps
white_list=(r'^components[\\/]viz[\\/].*\.(cc|h)$',)
return ps.RunAllChecks(input_api, output_api, white_list)
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, on Android) in addition to the regular CQ try
bots. These tests don't yet run by default on
android_n5x_swarming_rel, but viz changes need to run them.
When adding/removing tests here, ensure that both gpu/PRESUBMIT.py and
ui/gl/PRESUBMIT.py are updated.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:android_optional_gpu_tests_rel',
],
'Automatically added optional GPU tests to run on CQ.')
......@@ -22,22 +22,3 @@ def CheckChangeOnUpload(input_api, output_api):
def CheckChangeOnCommit(input_api, output_api):
return CommonChecks(input_api, output_api)
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, the WebGL 2.0 conformance tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_optional_gpu_tests_rel',
'luci.chromium.try:mac_optional_gpu_tests_rel',
'luci.chromium.try:win_optional_gpu_tests_rel',
'luci.chromium.try:android_optional_gpu_tests_rel',
],
'Automatically added optional GPU tests to run on CQ.')
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for device/vr.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, WebXR and WebVR browser tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
['luci.chromium.try:win_optional_gpu_tests_rel'],
'Automatically added optional GPU tests to run on CQ.')
......@@ -8,28 +8,6 @@ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, _change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, the WebGL 2.0 conformance tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
When adding/removing tests here, ensure that both gpu/PRESUBMIT.py and
ui/gl/PRESUBMIT.py are updated.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_optional_gpu_tests_rel',
'luci.chromium.try:mac_optional_gpu_tests_rel',
'luci.chromium.try:win_optional_gpu_tests_rel',
'luci.chromium.try:android_optional_gpu_tests_rel',
],
'Automatically added optional GPU tests to run on CQ.')
def CommonChecks(input_api, output_api):
import sys
......
......@@ -84,21 +84,3 @@ def CheckChangeOnUpload(input_api, output_api):
results.extend(_CheckBugInToDo(input_api, output_api))
results.extend(_CheckARCCompilationGuard(input_api, output_api))
return results
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook adds an extra try bot to the CL description in order to run Cronet
and EarlGrey tests in addition to CQ try bots.
"""
# TODO(crbug.com/712733): Remove ios-simulator-cronet once Cronet bots are
# deployed on CQ.
# TODO(crbug.com/782735): Remove ios-simulator-full-configs once EarlGrey
# bots are deployed on CQ.
try_bots = ['luci.chromium.try:ios-simulator-cronet',
'luci.chromium.try:ios-simulator-full-configs']
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl, try_bots, 'Automatically added Cronet and EarlGrey trybots to '
'run tests on CQ.')
# Copyright (c) 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for media/audio/.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, the WebGL 2.0 conformance tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_optional_gpu_tests_rel',
'luci.chromium.try:mac_optional_gpu_tests_rel',
'luci.chromium.try:win_optional_gpu_tests_rel',
'luci.chromium.try:android_optional_gpu_tests_rel',
],
'Automatically added optional GPU tests to run on CQ.')
# Copyright (c) 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for media/filters/.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, the WebGL 2.0 conformance tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_optional_gpu_tests_rel',
'luci.chromium.try:mac_optional_gpu_tests_rel',
'luci.chromium.try:win_optional_gpu_tests_rel',
'luci.chromium.try:android_optional_gpu_tests_rel',
],
'Automatically added optional GPU tests to run on CQ.')
# Copyright (c) 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for media/gpu/.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, the WebGL 2.0 conformance tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_optional_gpu_tests_rel',
'luci.chromium.try:mac_optional_gpu_tests_rel',
'luci.chromium.try:win_optional_gpu_tests_rel',
'luci.chromium.try:android_optional_gpu_tests_rel',
],
'Automatically added optional GPU tests to run on CQ.')
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This will add extra trybot coverage for non-default Android architectures
that have a history of breaking with Seccomp changes.
"""
def affects_seccomp(f):
seccomp_paths = [
'bpf_dsl/',
'seccomp-bpf/',
'seccomp-bpf-helpers/',
'system_headers/',
'tests/'
]
# If the file path contains any of the above fragments, it affects
# the Seccomp implementation.
affected_any = map(lambda sp: sp in f.LocalPath(), seccomp_paths)
return reduce(lambda a, b: a or b, affected_any)
if not change.AffectedFiles(file_filter=affects_seccomp):
return []
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:android_arm64_dbg_recipe',
'master.tryserver.chromium.android:android_compile_x64_dbg',
'master.tryserver.chromium.android:android_compile_x86_dbg',
],
'Automatically added Android multi-arch compile bots to run on CQ.')
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for //services/network.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook adds extra try bots to the CL description in order to run network
service tests in addition to CQ try bots.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_mojo'
],
'Automatically added network service trybots to run tests on CQ.')
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for shape_detection.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
import re
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook adds an extra try bot list to the CL description in order to run
the Mac GPU and Windows 10 bots in addition to the usual CQ try bots.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:mac_optional_gpu_tests_rel',
'luci.chromium.try:win10_chromium_x64_rel_ng'
],
'Automatically added optional Mac GPU and Windows 10 tests to run on CQ.')
......@@ -14,21 +14,3 @@ def CheckChangeOnUpload(input_api, output_api):
import presubmit_checks as ps
white_list=(r'^services[\\/]viz[\\/].*\.(cc|h)$',)
return ps.RunAllChecks(input_api, output_api, white_list)
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, on Android) in addition to the regular CQ try
bots. These tests don't yet run by default on
android_n5x_swarming_rel, but viz changes need to run them.
When adding/removing tests here, ensure that both gpu/PRESUBMIT.py and
ui/gl/PRESUBMIT.py are updated.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:android_optional_gpu_tests_rel',
],
'Automatically added optional GPU tests to run on CQ.')
......@@ -83,21 +83,3 @@ def CheckChangeOnUpload(input_api, output_api):
def CheckChangeOnCommit(input_api, output_api):
return CommonChecks(input_api, output_api)
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook adds extra try bots to the CL description in order to run network
service tests in addition to CQ try bots.
"""
def affects_gn_checker(f):
return 'mojo.fyi.network_' in f.LocalPath()
if not change.AffectedFiles(file_filter=affects_gn_checker):
return []
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_mojo'
],
'Automatically added network service trybots to run tests on CQ.')
......@@ -22,26 +22,3 @@ def CheckChangeOnUpload(input_api, output_api):
def CheckChangeOnCommit(input_api, output_api):
return CommonChecks(input_api, output_api)
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, the WebGL 2.0 conformance tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests. The trigger_multiple_dimensions script
is used on the chromium.gpu.fyi waterfall and associated optional
tryservers, so it's desired to run extra tests when modifying these
scripts.
"""
del change # for pylint
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_optional_gpu_tests_rel',
'luci.chromium.try:mac_optional_gpu_tests_rel',
'luci.chromium.try:win_optional_gpu_tests_rel',
'luci.chromium.try:android_optional_gpu_tests_rel',
],
'Automatically added optional GPU tests to run on CQ.')
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for //third_party/WebKit/LayoutTests/FlagExpectations.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook adds extra try bots to the CL description in order to run network
service tests in addition to CQ try bots.
"""
def affects_gn_checker(f):
return 'enable-features=NetworkService' in f.LocalPath()
if not change.AffectedFiles(file_filter=affects_gn_checker):
return []
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_mojo'
],
'Automatically added network service trybots to run tests on CQ.')
......@@ -70,90 +70,3 @@ def CheckChangeOnCommit(input_api, output_api):
results.extend(input_api.canned_checks.CheckChangeHasDescription(
input_api, output_api))
return results
def _ArePaintOrCompositingDirectoriesModified(change): # pylint: disable=C0103
"""Checks whether CL has changes to paint or compositing directories."""
paint_or_compositing_paths = [
os.path.join('third_party', 'WebKit', 'LayoutTests', 'FlagExpectations',
'enable-slimming-paint-v2'),
os.path.join('third_party', 'WebKit', 'LayoutTests', 'flag-specific',
'enable-slimming-paint-v2'),
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 paint_or_compositing_paths):
return True
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
"""Checks whether CL has changes to a layout ng directory."""
layout_ng_paths = [
os.path.join('third_party', 'WebKit', 'LayoutTests', 'FlagExpectations',
'enable-blink-features=LayoutNG'),
os.path.join('third_party', 'WebKit', 'LayoutTests', 'flag-specific',
'enable-blink-features=LayoutNG'),
]
for affected_file in change.AffectedFiles():
file_path = affected_file.LocalPath()
if any(x in file_path for x in layout_ng_paths):
return True
return False
def PostUploadHook(cl, change, output_api): # pylint: disable=C0103
"""git cl upload will call this hook after the issue is created/modified.
This hook adds extra try bots to the CL description in order to run slimming
paint v2 tests or LayoutNG tests in addition to the CQ try bots if the
change contains changes in a relevant direcotry (see:
_ArePaintOrCompositingDirectoriesModified and
_AreLayoutNGDirectoriesModified). For more information about
slimming-paint-v2 tests see https://crbug.com/601275 and for information
about the LayoutNG tests see https://crbug.com/706183.
"""
results = []
if _ArePaintOrCompositingDirectoriesModified(change):
results.extend(output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
['luci.chromium.try:'
'linux_layout_tests_slimming_paint_v2',
# TODO(kojii): Update linux_trusty_blink_rel to luci when migrated.
'master.tryserver.blink:linux_trusty_blink_rel'],
'Automatically added linux_layout_tests_slimming_paint_v2 and '
'linux_trusty_blink_rel to run on CQ due to changes in paint or '
'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):
results.extend(output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
['luci.chromium.try:'
'linux_layout_tests_layout_ng'],
'Automatically added linux_layout_tests_layout_ng to run on CQ due '
'to changes in LayoutNG directories.'))
return results
......@@ -193,81 +193,3 @@ def CheckChangeOnCommit(input_api, output_api):
results.extend(input_api.canned_checks.CheckChangeHasDescription(
input_api, output_api))
return results
def _ArePaintOrCompositingDirectoriesModified(change): # pylint: disable=C0103
"""Checks whether CL has changes to paint or compositing directories."""
paint_or_compositing_paths = [
os.path.join('third_party', 'blink', 'renderer', 'platform', 'graphics'),
os.path.join('third_party', 'blink', 'renderer', 'core', 'layout',
'compositing'),
os.path.join('third_party', 'blink', 'renderer', 'core', 'svg'),
os.path.join('third_party', 'blink', 'renderer', 'core', 'paint'),
os.path.join('third_party', 'blink', 'web_tests', 'FlagExpectations',
'enable-slimming-paint-v2'),
os.path.join('third_party', 'blink', 'web_tests', 'flag-specific',
'enable-slimming-paint-v2'),
os.path.join('third_party', 'blink', 'web_tests', 'FlagExpectations',
'enable-blink-gen-property-trees'),
os.path.join('third_party', 'blink', 'web_tests', '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 paint_or_compositing_paths):
return True
return False
def _AreLayoutNGDirectoriesModified(change): # pylint: disable=C0103
"""Checks whether CL has changes to a layout ng directory."""
layout_ng_paths = [
os.path.join('third_party', 'blink', 'renderer', 'core', 'editing'),
os.path.join('third_party', 'blink', 'renderer', 'core', 'layout',
'ng'),
os.path.join('third_party', 'blink', 'renderer', 'core', 'paint',
'ng'),
os.path.join('third_party', 'blink', 'renderer', 'platform', 'fonts',
'shaping'),
os.path.join('third_party', 'blink', 'web_tests', 'FlagExpectations',
'enable-blink-features=LayoutNG'),
os.path.join('third_party', 'blink', 'web_tests', 'flag-specific',
'enable-blink-features=LayoutNG'),
]
for affected_file in change.AffectedFiles():
file_path = affected_file.LocalPath()
if any(x in file_path for x in layout_ng_paths):
return True
return False
def PostUploadHook(cl, change, output_api): # pylint: disable=C0103
"""git cl upload will call this hook after the issue is created/modified.
This hook adds extra try bots to the CL description in order to run slimming
paint v2 tests or LayoutNG tests in addition to the CQ try bots if the
change contains changes in a relevant direcotry (see:
_ArePaintOrCompositingDirectoriesModified and
_AreLayoutNGDirectoriesModified). For more information about
slimming-paint-v2 tests see https://crbug.com/601275 and for information
about the LayoutNG tests see https://crbug.com/706183.
"""
results = []
if _ArePaintOrCompositingDirectoriesModified(change):
results.extend(output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
['luci.chromium.try:'
'linux_layout_tests_slimming_paint_v2',
# TODO(kojii): Update linux_trusty_blink_rel to luci when migrated.
'master.tryserver.blink:linux_trusty_blink_rel'],
'Automatically added linux_layout_tests_slimming_paint_v2 and '
'linux_trusty_blink_rel to run on CQ due to changes in paint or '
'compositing directories.'))
if _AreLayoutNGDirectoriesModified(change):
results.extend(output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
['luci.chromium.try:'
'linux_layout_tests_layout_ng'],
'Automatically added linux_layout_tests_layout_ng to run on CQ due '
'to changes in LayoutNG directories.'))
return results
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for third_party/blink/renderer/modules/vr.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api): # pylint: disable=C0103,W0613
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, WebXR and WebVR browser tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
['luci.chromium.try:win_optional_gpu_tests_rel'],
'Automatically added optional GPU tests to run on CQ.')
# Copyright (c) 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for Source/modules/webgl.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, the WebGL 2.0 conformance tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
['luci.chromium.try:linux_optional_gpu_tests_rel',
'luci.chromium.try:mac_optional_gpu_tests_rel',
'luci.chromium.try:win_optional_gpu_tests_rel',
'luci.chromium.try:android_optional_gpu_tests_rel'],
'Automatically added optional GPU tests to run on CQ.')
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for third_party/blink/renderer/modules/xr.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api): # pylint: disable=C0103,W0613
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, WebXR and WebVR browser tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
['luci.chromium.try:win_optional_gpu_tests_rel'],
'Automatically added optional GPU tests to run on CQ.')
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for third_party/blink/renderer/platform/graphics/gpu.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api): # pylint: disable=C0103,W0613
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, WebXR and WebVR browser tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
['luci.chromium.try:win_optional_gpu_tests_rel'],
'Automatically added optional GPU tests to run on CQ.')
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
def PostUploadHook(cl, change, output_api):
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:closure_compilation',
],
'Automatically added optional Closure bots to run on CQ.')
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
def PostUploadHook(cl, change, output_api):
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:closure_compilation',
],
'Automatically added optional Closure bots to run on CQ.')
# Copyright (c) 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for //ui/gl.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook modifies the CL description in order to run extra GPU
tests (in particular, the WebGL 2.0 conformance tests) in addition
to the regular CQ try bots. This test suite is too large to run
against all Chromium commits, but should be run against changes
likely to affect these tests.
When adding/removing tests here, ensure that both gpu/PRESUBMIT.py and
ui/gl/PRESUBMIT.py are updated.
"""
return output_api.EnsureCQIncludeTrybotsAreAdded(
cl,
[
'luci.chromium.try:linux_optional_gpu_tests_rel',
'luci.chromium.try:mac_optional_gpu_tests_rel',
'luci.chromium.try:win_optional_gpu_tests_rel',
'luci.chromium.try:android_optional_gpu_tests_rel',
],
'Automatically added optional GPU tests to run on CQ.')
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