| 1 |
# Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 |
# Use of this source code is governed by a BSD-style license that can be |
| 3 |
# found in the LICENSE file. |
| 4 |
|
| 5 |
|
| 6 |
# Recipe for the Skia PerCommit Housekeeper. |
| 7 |
|
| 8 |
|
| 9 |
import calendar |
| 10 |
|
| 11 |
|
| 12 |
DEPS = [ |
| 13 |
'checkout', |
| 14 |
'doxygen', |
| 15 |
'recipe_engine/file', |
| 16 |
'recipe_engine/path', |
| 17 |
'recipe_engine/properties', |
| 18 |
'run', |
| 19 |
'vars', |
| 20 |
] |
| 21 |
|
| 22 |
|
| 23 |
def RunSteps(api): |
| 24 |
# Checkout, compile, etc. |
| 25 |
api.vars.setup() |
| 26 |
checkout_root = api.checkout.default_checkout_root |
| 27 |
api.checkout.bot_update(checkout_root=checkout_root) |
| 28 |
api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir) |
| 29 |
|
| 30 |
# TODO(borenet): Detect static initializers? |
| 31 |
|
| 32 |
skia_dir = checkout_root.joinpath('skia') |
| 33 |
if not api.vars.is_trybot: |
| 34 |
api.doxygen.generate_and_upload(skia_dir) |
| 35 |
|
| 36 |
|
| 37 |
def GenTests(api): |
| 38 |
yield ( |
| 39 |
api.test('Housekeeper-PerCommit') + |
| 40 |
api.properties(buildername='Housekeeper-PerCommit', |
| 41 |
repository='https://skia.googlesource.com/skia.git', |
| 42 |
revision='abc123', |
| 43 |
path_config='kitchen', |
| 44 |
swarm_out_dir='[SWARM_OUT_DIR]') + |
| 45 |
api.path.exists(api.path.start_dir) |
| 46 |
) |
| 47 |
yield ( |
| 48 |
api.test('Housekeeper-PerCommit-Trybot') + |
| 49 |
api.properties(buildername='Housekeeper-PerCommit', |
| 50 |
repository='https://skia.googlesource.com/skia.git', |
| 51 |
revision='abc123', |
| 52 |
path_config='kitchen', |
| 53 |
patch_issue='456789', |
| 54 |
patch_set='11', |
| 55 |
patch_ref='refs/changes/89/456789/12', |
| 56 |
patch_repo='https://skia.googlesource.com/skia.git', |
| 57 |
patch_storage='gerrit', |
| 58 |
swarm_out_dir='[SWARM_OUT_DIR]') + |
| 59 |
api.path.exists(api.path.start_dir) |
| 60 |
) |