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
9DEPS = [
10  'core',
11  'infra',
12  'recipe_engine/path',
13  'recipe_engine/properties',
14  'recipe_engine/python',
15  'recipe_engine/step',
16  'run',
17  'vars',
18]
19
20
21def RunSteps(api):
22  api.vars.setup()
23  api.infra.update_go_deps()
24  with api.infra.MetadataFetch(api, 'key', 'file'):
25    pass
26
27
28def GenTests(api):
29  yield (
30      api.test('infra_tests') +
31      api.properties(buildername='Housekeeper-PerCommit-InfraTests',
32                     repository='https://skia.googlesource.com/skia.git',
33                     revision='abc123',
34                     path_config='kitchen',
35                     swarm_out_dir='[SWARM_OUT_DIR]')
36  )
37
38  yield (
39    api.test('failed_one_update') +
40      api.properties(buildername='Housekeeper-PerCommit-InfraTests',
41                     repository='https://skia.googlesource.com/skia.git',
42                     revision='abc123',
43                     path_config='kitchen',
44                     swarm_out_dir='[SWARM_OUT_DIR]') +
45    api.step_data('update go pkgs', retcode=1)
46  )
47
48  yield (
49    api.test('failed_all_updates') +
50      api.properties(buildername='Housekeeper-PerCommit-InfraTests',
51                     repository='https://skia.googlesource.com/skia.git',
52                     revision='abc123',
53                     path_config='kitchen',
54                     swarm_out_dir='[SWARM_OUT_DIR]') +
55    api.step_data('update go pkgs', retcode=1) +
56    api.step_data('update go pkgs (attempt 2)', retcode=1) +
57    api.step_data('update go pkgs (attempt 3)', retcode=1) +
58    api.step_data('update go pkgs (attempt 4)', retcode=1) +
59    api.step_data('update go pkgs (attempt 5)', retcode=1)
60  )
61