blob: fac2c5d5b66896df8d9cb92120cefc509418fc1c [file] [log] [blame]
borenet2dbbfa52016-10-14 06:32:09 -07001# 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
9DEPS = [
Robert Iannucci297a7ef2017-05-12 19:09:38 -070010 'recipe_engine/context',
borenet2dbbfa52016-10-14 06:32:09 -070011 'recipe_engine/path',
12 'recipe_engine/properties',
13 'recipe_engine/step',
Eric Boren7e97dc02017-02-02 09:02:37 -050014 'core',
15 'infra',
16 'run',
17 'vars',
borenet2dbbfa52016-10-14 06:32:09 -070018]
19
20
21def RunSteps(api):
22 api.vars.setup()
23 api.core.checkout_steps()
borenet09732a62016-10-24 06:36:30 -070024 api.infra.update_go_deps()
borenet2dbbfa52016-10-14 06:32:09 -070025
borenet61013b22016-10-20 11:38:30 -070026 # Run the infra tests.
Eric Boren7e3a3642017-06-14 15:25:31 -040027 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 Boren7de9c1a2017-04-19 10:58:22 -040032 api.step('infra_tests', cmd=['make', '-C', 'infra/bots', 'test'])
borenet2dbbfa52016-10-14 06:32:09 -070033
34
35def GenTests(api):
36 yield (
37 api.test('infra_tests') +
38 api.properties(buildername='Housekeeper-PerCommit-InfraTests',
Eric Borenad29aee2017-01-17 14:35:06 -050039 repository='https://skia.googlesource.com/skia.git',
borenet2dbbfa52016-10-14 06:32:09 -070040 revision='abc123',
41 path_config='kitchen',
42 swarm_out_dir='[SWARM_OUT_DIR]')
43 )
borenet61013b22016-10-20 11:38:30 -070044
45 yield (
46 api.test('failed_one_update') +
47 api.properties(buildername='Housekeeper-PerCommit-InfraTests',
Eric Borenad29aee2017-01-17 14:35:06 -050048 repository='https://skia.googlesource.com/skia.git',
borenet61013b22016-10-20 11:38:30 -070049 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 Borenad29aee2017-01-17 14:35:06 -050058 repository='https://skia.googlesource.com/skia.git',
borenet61013b22016-10-20 11:38:30 -070059 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 )