borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 1 | # Copyright 2016 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 which runs the Skia infra tests. |
| 7 | |
| 8 | |
| 9 | DEPS = [ |
Robert Iannucci | 297a7ef | 2017-05-12 19:09:38 -0700 | [diff] [blame] | 10 | 'recipe_engine/context', |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 11 | 'recipe_engine/path', |
| 12 | 'recipe_engine/properties', |
| 13 | 'recipe_engine/step', |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 14 | 'core', |
| 15 | 'infra', |
| 16 | 'run', |
| 17 | 'vars', |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 18 | ] |
| 19 | |
| 20 | |
| 21 | def RunSteps(api): |
| 22 | api.vars.setup() |
| 23 | api.core.checkout_steps() |
borenet | 09732a6 | 2016-10-24 06:36:30 -0700 | [diff] [blame] | 24 | api.infra.update_go_deps() |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 25 | |
borenet | 61013b2 | 2016-10-20 11:38:30 -0700 | [diff] [blame] | 26 | # Run the infra tests. |
Eric Boren | 7e3a364 | 2017-06-14 15:25:31 -0400 | [diff] [blame] | 27 | repo_name = api.properties['repository'].split('/')[-1] |
| 28 | if repo_name.endswith('.git'): |
| 29 | repo_name = repo_name[:-len('.git')] |
| 30 | with api.context(cwd=api.vars.checkout_root.join(repo_name), |
| 31 | env=api.infra.go_env): |
Eric Boren | 7de9c1a | 2017-04-19 10:58:22 -0400 | [diff] [blame] | 32 | api.step('infra_tests', cmd=['make', '-C', 'infra/bots', 'test']) |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 33 | |
| 34 | |
| 35 | def GenTests(api): |
| 36 | yield ( |
| 37 | api.test('infra_tests') + |
| 38 | api.properties(buildername='Housekeeper-PerCommit-InfraTests', |
Eric Boren | ad29aee | 2017-01-17 14:35:06 -0500 | [diff] [blame] | 39 | repository='https://skia.googlesource.com/skia.git', |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 40 | revision='abc123', |
| 41 | path_config='kitchen', |
| 42 | swarm_out_dir='[SWARM_OUT_DIR]') |
| 43 | ) |
borenet | 61013b2 | 2016-10-20 11:38:30 -0700 | [diff] [blame] | 44 | |
| 45 | yield ( |
| 46 | api.test('failed_one_update') + |
| 47 | api.properties(buildername='Housekeeper-PerCommit-InfraTests', |
Eric Boren | ad29aee | 2017-01-17 14:35:06 -0500 | [diff] [blame] | 48 | repository='https://skia.googlesource.com/skia.git', |
borenet | 61013b2 | 2016-10-20 11:38:30 -0700 | [diff] [blame] | 49 | revision='abc123', |
| 50 | path_config='kitchen', |
| 51 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 52 | api.step_data('update go pkgs', retcode=1) |
| 53 | ) |
| 54 | |
| 55 | yield ( |
| 56 | api.test('failed_all_updates') + |
| 57 | api.properties(buildername='Housekeeper-PerCommit-InfraTests', |
Eric Boren | ad29aee | 2017-01-17 14:35:06 -0500 | [diff] [blame] | 58 | repository='https://skia.googlesource.com/skia.git', |
borenet | 61013b2 | 2016-10-20 11:38:30 -0700 | [diff] [blame] | 59 | revision='abc123', |
| 60 | path_config='kitchen', |
| 61 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 62 | api.step_data('update go pkgs', retcode=1) + |
| 63 | api.step_data('update go pkgs (attempt 2)', retcode=1) + |
| 64 | api.step_data('update go pkgs (attempt 3)', retcode=1) + |
| 65 | api.step_data('update go pkgs (attempt 4)', retcode=1) + |
| 66 | api.step_data('update go pkgs (attempt 5)', retcode=1) |
| 67 | ) |