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