2016-07-26 18:52:17 +00:00
|
|
|
# Copyright 2014 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.
|
|
|
|
|
|
|
|
|
|
|
|
# Recipe for the Skia PerCommit Housekeeper.
|
|
|
|
|
2018-03-12 12:59:00 +00:00
|
|
|
|
|
|
|
import calendar
|
|
|
|
|
|
|
|
|
2016-07-26 18:52:17 +00:00
|
|
|
DEPS = [
|
2018-05-24 13:14:18 +00:00
|
|
|
'checkout',
|
|
|
|
'doxygen',
|
2018-05-04 17:46:15 +00:00
|
|
|
'flavor',
|
2018-03-12 12:59:00 +00:00
|
|
|
'recipe_engine/file',
|
2016-07-26 18:52:17 +00:00
|
|
|
'recipe_engine/path',
|
|
|
|
'recipe_engine/properties',
|
2017-02-02 14:02:37 +00:00
|
|
|
'run',
|
|
|
|
'vars',
|
2016-07-26 18:52:17 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def RunSteps(api):
|
|
|
|
# Checkout, compile, etc.
|
2018-05-04 17:46:15 +00:00
|
|
|
api.vars.setup()
|
2018-05-24 13:14:18 +00:00
|
|
|
checkout_root = api.checkout.default_checkout_root
|
2018-10-09 20:25:27 +00:00
|
|
|
api.checkout.bot_update(checkout_root=checkout_root)
|
2018-05-04 17:46:15 +00:00
|
|
|
api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
|
|
|
|
api.flavor.setup()
|
2016-07-26 18:52:17 +00:00
|
|
|
|
|
|
|
# TODO(borenet): Detect static initializers?
|
|
|
|
|
2018-05-24 13:14:18 +00:00
|
|
|
skia_dir = checkout_root.join('skia')
|
|
|
|
if not api.vars.is_trybot:
|
|
|
|
api.doxygen.generate_and_upload(skia_dir)
|
2017-03-20 19:40:12 +00:00
|
|
|
|
2016-08-12 15:50:29 +00:00
|
|
|
|
2016-07-26 18:52:17 +00:00
|
|
|
def GenTests(api):
|
2016-12-02 16:01:33 +00:00
|
|
|
yield (
|
|
|
|
api.test('Housekeeper-PerCommit') +
|
|
|
|
api.properties(buildername='Housekeeper-PerCommit',
|
2017-01-17 19:35:06 +00:00
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
2016-12-02 16:01:33 +00:00
|
|
|
revision='abc123',
|
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]') +
|
|
|
|
api.path.exists(api.path['start_dir'])
|
|
|
|
)
|
|
|
|
yield (
|
|
|
|
api.test('Housekeeper-PerCommit-Trybot') +
|
|
|
|
api.properties(buildername='Housekeeper-PerCommit',
|
2017-01-17 19:35:06 +00:00
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
2016-12-02 16:01:33 +00:00
|
|
|
revision='abc123',
|
|
|
|
path_config='kitchen',
|
2018-10-09 20:25:27 +00:00
|
|
|
patch_issue='456789',
|
|
|
|
patch_set='11',
|
2018-09-12 18:39:34 +00:00
|
|
|
patch_ref='refs/changes/89/456789/12',
|
|
|
|
patch_repo='https://skia.googlesource.com/skia.git',
|
2016-12-02 16:01:33 +00:00
|
|
|
patch_storage='gerrit',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]') +
|
|
|
|
api.path.exists(api.path['start_dir'])
|
|
|
|
)
|