2017-04-18 19:49:27 +00:00
|
|
|
# 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.
|
|
|
|
|
|
|
|
|
|
|
|
DEPS = [
|
2018-05-24 13:14:18 +00:00
|
|
|
'checkout',
|
2018-05-04 17:46:15 +00:00
|
|
|
'recipe_engine/file',
|
2017-04-18 19:49:27 +00:00
|
|
|
'recipe_engine/path',
|
2019-04-24 18:14:27 +00:00
|
|
|
'recipe_engine/platform',
|
2017-04-18 19:49:27 +00:00
|
|
|
'recipe_engine/properties',
|
2018-05-04 17:46:15 +00:00
|
|
|
'run',
|
|
|
|
'vars',
|
2017-04-18 19:49:27 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def RunSteps(api):
|
2018-05-04 17:46:15 +00:00
|
|
|
api.vars.setup()
|
2018-05-18 11:36:55 +00:00
|
|
|
|
2018-02-22 15:03:56 +00:00
|
|
|
bot_update = True
|
|
|
|
if 'NoDEPS' in api.properties['buildername']:
|
|
|
|
bot_update = False
|
2018-05-18 11:36:55 +00:00
|
|
|
|
2018-05-30 18:36:03 +00:00
|
|
|
checkout_root = api.checkout.default_checkout_root
|
|
|
|
checkout_chromium = False
|
|
|
|
checkout_flutter = False
|
|
|
|
extra_gclient_env = {}
|
|
|
|
flutter_android = False
|
|
|
|
parent_rev = False
|
|
|
|
if 'CommandBuffer' in api.vars.builder_name:
|
|
|
|
checkout_chromium = True
|
|
|
|
if 'RecreateSKPs' in api.vars.builder_name:
|
|
|
|
checkout_chromium = True
|
|
|
|
extra_gclient_env['CPPFLAGS'] = (
|
|
|
|
'-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1')
|
|
|
|
if 'Flutter' in api.vars.builder_name:
|
|
|
|
checkout_root = checkout_root.join('flutter')
|
|
|
|
checkout_flutter = True
|
|
|
|
if 'Android' in api.vars.builder_name:
|
|
|
|
flutter_android = True
|
|
|
|
if 'ParentRevision' in api.vars.builder_name:
|
|
|
|
parent_rev = True
|
|
|
|
|
2018-05-04 17:46:15 +00:00
|
|
|
if bot_update:
|
2018-05-30 18:36:03 +00:00
|
|
|
api.checkout.bot_update(
|
|
|
|
checkout_root=checkout_root,
|
|
|
|
checkout_chromium=checkout_chromium,
|
|
|
|
checkout_flutter=checkout_flutter,
|
|
|
|
extra_gclient_env=extra_gclient_env,
|
|
|
|
flutter_android=flutter_android,
|
|
|
|
parent_rev=parent_rev)
|
2018-05-04 17:46:15 +00:00
|
|
|
else:
|
2018-05-24 13:14:18 +00:00
|
|
|
api.checkout.git(checkout_root=api.path['start_dir'])
|
2018-05-04 17:46:15 +00:00
|
|
|
api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
|
2017-04-18 19:49:27 +00:00
|
|
|
|
|
|
|
|
2018-05-18 13:54:02 +00:00
|
|
|
TEST_BUILDERS = [
|
|
|
|
'Build-Win-Clang-x86_64-Release-ParentRevision',
|
|
|
|
'Build-Mac-Clang-x86_64-Debug-CommandBuffer',
|
|
|
|
'Housekeeper-Weekly-RecreateSKPs',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-04-18 19:49:27 +00:00
|
|
|
def GenTests(api):
|
2018-05-18 13:54:02 +00:00
|
|
|
for buildername in TEST_BUILDERS:
|
2019-04-24 18:14:27 +00:00
|
|
|
test = (
|
2018-05-18 13:54:02 +00:00
|
|
|
api.test(buildername) +
|
|
|
|
api.properties(buildername=buildername,
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
revision='abc123',
|
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]')
|
|
|
|
)
|
2019-04-24 18:14:27 +00:00
|
|
|
if 'Win' in buildername and not 'LenovoYogaC630' in buildername:
|
|
|
|
test += api.platform('win', 64)
|
|
|
|
yield test
|
2018-05-18 13:54:02 +00:00
|
|
|
|
2018-01-04 16:37:17 +00:00
|
|
|
buildername = 'Build-Win-Clang-x86_64-Release-ParentRevision'
|
|
|
|
yield (
|
|
|
|
api.test('parent_revision_trybot') +
|
|
|
|
api.properties(buildername=buildername,
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
revision='abc123',
|
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]',
|
2018-09-12 18:39:34 +00:00
|
|
|
patch_issue=456789,
|
|
|
|
patch_set=12,
|
|
|
|
patch_ref='refs/changes/89/456789/12',
|
|
|
|
patch_repo='https://skia.googlesource.com/skia.git',
|
2019-04-24 18:14:27 +00:00
|
|
|
patch_storage='gerrit') +
|
|
|
|
api.platform('win', 64)
|
2018-01-04 16:37:17 +00:00
|
|
|
)
|
|
|
|
|
2018-10-10 13:38:14 +00:00
|
|
|
buildername = 'Build-Debian9-Clang-arm-Release-Flutter_Android'
|
2017-04-18 19:49:27 +00:00
|
|
|
yield (
|
|
|
|
api.test('flutter_trybot') +
|
|
|
|
api.properties(
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
buildername=buildername,
|
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]',
|
|
|
|
revision='abc123',
|
2018-09-12 18:39:34 +00:00
|
|
|
patch_issue=456789,
|
|
|
|
patch_set=12,
|
|
|
|
patch_ref='refs/changes/89/456789/12',
|
|
|
|
patch_repo='https://skia.googlesource.com/skia.git',
|
2017-04-18 19:49:27 +00:00
|
|
|
patch_storage='gerrit') +
|
|
|
|
api.path.exists(
|
|
|
|
api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2018-02-22 15:03:56 +00:00
|
|
|
builder = 'Build-Debian9-Clang-x86_64-Release-NoDEPS'
|
|
|
|
yield (
|
|
|
|
api.test(builder) +
|
|
|
|
api.properties(buildername=builder,
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
revision='abc123',
|
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]',
|
2018-09-12 18:39:34 +00:00
|
|
|
patch_issue=456789,
|
|
|
|
patch_set=12,
|
|
|
|
patch_ref='refs/changes/89/456789/12',
|
2018-02-22 15:03:56 +00:00
|
|
|
patch_repo='https://skia.googlesource.com/skia.git',
|
|
|
|
patch_storage='gerrit') +
|
|
|
|
api.path.exists(api.path['start_dir'].join('skp_output'))
|
|
|
|
)
|
|
|
|
|
2017-09-26 18:11:15 +00:00
|
|
|
buildername = 'Build-Debian9-GCC-x86_64-Release'
|
2017-04-21 13:37:37 +00:00
|
|
|
yield (
|
|
|
|
api.test('cross_repo_trybot') +
|
|
|
|
api.properties(
|
|
|
|
repository='https://skia.googlesource.com/parent_repo.git',
|
|
|
|
buildername=buildername,
|
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]',
|
|
|
|
revision='abc123',
|
2018-09-12 18:39:34 +00:00
|
|
|
patch_issue=456789,
|
|
|
|
patch_set=12,
|
|
|
|
patch_ref='refs/changes/89/456789/12',
|
2017-04-21 13:37:37 +00:00
|
|
|
patch_repo='https://skia.googlesource.com/skia.git',
|
|
|
|
patch_storage='gerrit') +
|
|
|
|
api.path.exists(
|
|
|
|
api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
|
|
|
|
)
|
|
|
|
)
|
2018-09-07 19:33:39 +00:00
|
|
|
yield (
|
|
|
|
api.test('trybot') +
|
|
|
|
api.properties(buildername=buildername,
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
revision='abc123',
|
|
|
|
path_config='kitchen',
|
2018-09-12 18:39:34 +00:00
|
|
|
patch_issue=456789,
|
|
|
|
patch_set=12,
|
2018-09-07 19:33:39 +00:00
|
|
|
patch_ref='refs/changes/89/456789/12',
|
2018-09-12 18:39:34 +00:00
|
|
|
patch_repo='https://skia.googlesource.com/skia.git',
|
2018-09-07 19:33:39 +00:00
|
|
|
patch_storage='gerrit',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]')
|
|
|
|
)
|