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 9import calendar 10 11 12DEPS = [ 13 'checkout', 14 'doxygen', 15 'flavor', 16 'recipe_engine/file', 17 'recipe_engine/path', 18 'recipe_engine/properties', 19 'run', 20 'vars', 21] 22 23 24def RunSteps(api): 25 # Checkout, compile, etc. 26 api.vars.setup() 27 checkout_root = api.checkout.default_checkout_root 28 api.checkout.bot_update(checkout_root=checkout_root) 29 api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir) 30 api.flavor.setup() 31 32 # TODO(borenet): Detect static initializers? 33 34 skia_dir = checkout_root.join('skia') 35 if not api.vars.is_trybot: 36 api.doxygen.generate_and_upload(skia_dir) 37 38 39def GenTests(api): 40 yield ( 41 api.test('Housekeeper-PerCommit') + 42 api.properties(buildername='Housekeeper-PerCommit', 43 repository='https://skia.googlesource.com/skia.git', 44 revision='abc123', 45 path_config='kitchen', 46 swarm_out_dir='[SWARM_OUT_DIR]') + 47 api.path.exists(api.path['start_dir']) 48 ) 49 yield ( 50 api.test('Housekeeper-PerCommit-Trybot') + 51 api.properties(buildername='Housekeeper-PerCommit', 52 repository='https://skia.googlesource.com/skia.git', 53 revision='abc123', 54 path_config='kitchen', 55 patch_issue='456789', 56 patch_set='11', 57 patch_ref='refs/changes/89/456789/12', 58 patch_repo='https://skia.googlesource.com/skia.git', 59 patch_storage='gerrit', 60 swarm_out_dir='[SWARM_OUT_DIR]') + 61 api.path.exists(api.path['start_dir']) 62 ) 63