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 = [ |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 10 | 'recipe_engine/path', |
| 11 | 'recipe_engine/properties', |
| 12 | 'recipe_engine/step', |
Eric Boren | 6441a46 | 2017-01-13 13:37:53 -0500 | [diff] [blame] | 13 | 'skia-recipes/core', |
| 14 | 'skia-recipes/infra', |
| 15 | 'skia-recipes/run', |
| 16 | 'skia-recipes/vars', |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 17 | ] |
| 18 | |
| 19 | |
| 20 | def RunSteps(api): |
| 21 | api.vars.setup() |
| 22 | api.core.checkout_steps() |
borenet | 09732a6 | 2016-10-24 06:36:30 -0700 | [diff] [blame] | 23 | api.infra.update_go_deps() |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 24 | |
borenet | 61013b2 | 2016-10-20 11:38:30 -0700 | [diff] [blame] | 25 | # Run the infra tests. |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 26 | infra_tests = api.vars.skia_dir.join( |
| 27 | 'infra', 'bots', 'infra_tests.py') |
| 28 | api.step('infra_tests', |
| 29 | cmd=['python', infra_tests], |
| 30 | cwd=api.vars.skia_dir, |
borenet | 09732a6 | 2016-10-24 06:36:30 -0700 | [diff] [blame] | 31 | env=api.infra.go_env) |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 32 | |
| 33 | |
| 34 | def GenTests(api): |
| 35 | yield ( |
| 36 | api.test('infra_tests') + |
| 37 | api.properties(buildername='Housekeeper-PerCommit-InfraTests', |
| 38 | mastername='client.skia.fyi', |
| 39 | slavename='dummy-slave', |
| 40 | buildnumber=5, |
Eric Boren | ad29aee | 2017-01-17 14:35:06 -0500 | [diff] [blame^] | 41 | repository='https://skia.googlesource.com/skia.git', |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 42 | revision='abc123', |
| 43 | path_config='kitchen', |
| 44 | swarm_out_dir='[SWARM_OUT_DIR]') |
| 45 | ) |
borenet | 61013b2 | 2016-10-20 11:38:30 -0700 | [diff] [blame] | 46 | |
| 47 | yield ( |
| 48 | api.test('failed_one_update') + |
| 49 | api.properties(buildername='Housekeeper-PerCommit-InfraTests', |
| 50 | mastername='client.skia.fyi', |
| 51 | slavename='dummy-slave', |
| 52 | buildnumber=5, |
Eric Boren | ad29aee | 2017-01-17 14:35:06 -0500 | [diff] [blame^] | 53 | repository='https://skia.googlesource.com/skia.git', |
borenet | 61013b2 | 2016-10-20 11:38:30 -0700 | [diff] [blame] | 54 | revision='abc123', |
| 55 | path_config='kitchen', |
| 56 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 57 | api.step_data('update go pkgs', retcode=1) |
| 58 | ) |
| 59 | |
| 60 | yield ( |
| 61 | api.test('failed_all_updates') + |
| 62 | api.properties(buildername='Housekeeper-PerCommit-InfraTests', |
| 63 | mastername='client.skia.fyi', |
| 64 | slavename='dummy-slave', |
| 65 | buildnumber=5, |
Eric Boren | ad29aee | 2017-01-17 14:35:06 -0500 | [diff] [blame^] | 66 | repository='https://skia.googlesource.com/skia.git', |
borenet | 61013b2 | 2016-10-20 11:38:30 -0700 | [diff] [blame] | 67 | revision='abc123', |
| 68 | path_config='kitchen', |
| 69 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 70 | api.step_data('update go pkgs', retcode=1) + |
| 71 | api.step_data('update go pkgs (attempt 2)', retcode=1) + |
| 72 | api.step_data('update go pkgs (attempt 3)', retcode=1) + |
| 73 | api.step_data('update go pkgs (attempt 4)', retcode=1) + |
| 74 | api.step_data('update go pkgs (attempt 5)', retcode=1) |
| 75 | ) |