borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 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 | |
Eric Boren | 3be061c | 2018-03-12 08:59:00 -0400 | [diff] [blame] | 8 | |
| 9 | import calendar |
| 10 | |
| 11 | |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 12 | DEPS = [ |
Eric Boren | 90f0503 | 2018-05-24 09:14:18 -0400 | [diff] [blame] | 13 | 'checkout', |
| 14 | 'doxygen', |
Eric Boren | 3be061c | 2018-03-12 08:59:00 -0400 | [diff] [blame] | 15 | 'recipe_engine/file', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 16 | 'recipe_engine/path', |
| 17 | 'recipe_engine/properties', |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 18 | 'run', |
| 19 | 'vars', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 20 | ] |
| 21 | |
| 22 | |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 23 | def RunSteps(api): |
| 24 | # Checkout, compile, etc. |
Eric Boren | b702316 | 2018-05-04 13:46:15 -0400 | [diff] [blame] | 25 | api.vars.setup() |
Eric Boren | 90f0503 | 2018-05-24 09:14:18 -0400 | [diff] [blame] | 26 | checkout_root = api.checkout.default_checkout_root |
Kevin Lubick | 37baac1 | 2018-10-09 16:25:27 -0400 | [diff] [blame] | 27 | api.checkout.bot_update(checkout_root=checkout_root) |
Eric Boren | b702316 | 2018-05-04 13:46:15 -0400 | [diff] [blame] | 28 | api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir) |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 29 | |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 30 | # TODO(borenet): Detect static initializers? |
| 31 | |
Eric Boren | 90f0503 | 2018-05-24 09:14:18 -0400 | [diff] [blame] | 32 | skia_dir = checkout_root.join('skia') |
| 33 | if not api.vars.is_trybot: |
| 34 | api.doxygen.generate_and_upload(skia_dir) |
Eric Boren | 53262d0 | 2017-03-20 15:40:12 -0400 | [diff] [blame] | 35 | |
jcgregorio | 106a9ff | 2016-08-12 08:50:29 -0700 | [diff] [blame] | 36 | |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 37 | def GenTests(api): |
Eric Boren | 22f5ef7 | 2016-12-02 11:01:33 -0500 | [diff] [blame] | 38 | yield ( |
| 39 | api.test('Housekeeper-PerCommit') + |
| 40 | api.properties(buildername='Housekeeper-PerCommit', |
Eric Boren | ad29aee | 2017-01-17 14:35:06 -0500 | [diff] [blame] | 41 | repository='https://skia.googlesource.com/skia.git', |
Eric Boren | 22f5ef7 | 2016-12-02 11:01:33 -0500 | [diff] [blame] | 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', |
Eric Boren | ad29aee | 2017-01-17 14:35:06 -0500 | [diff] [blame] | 50 | repository='https://skia.googlesource.com/skia.git', |
Eric Boren | 22f5ef7 | 2016-12-02 11:01:33 -0500 | [diff] [blame] | 51 | revision='abc123', |
| 52 | path_config='kitchen', |
Kevin Lubick | 37baac1 | 2018-10-09 16:25:27 -0400 | [diff] [blame] | 53 | patch_issue='456789', |
| 54 | patch_set='11', |
Eric Boren | 858f648 | 2018-09-12 14:39:34 -0400 | [diff] [blame] | 55 | patch_ref='refs/changes/89/456789/12', |
| 56 | patch_repo='https://skia.googlesource.com/skia.git', |
Eric Boren | 22f5ef7 | 2016-12-02 11:01:33 -0500 | [diff] [blame] | 57 | patch_storage='gerrit', |
Eric Boren | 22f5ef7 | 2016-12-02 11:01:33 -0500 | [diff] [blame] | 58 | swarm_out_dir='[SWARM_OUT_DIR]') + |
Eric Boren | 22f5ef7 | 2016-12-02 11:01:33 -0500 | [diff] [blame] | 59 | api.path.exists(api.path['start_dir']) |
| 60 | ) |