• 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  'checkout',
11  'infra',
12  'recipe_engine/context',
13  'recipe_engine/properties',
14  'recipe_engine/step',
15  'vars',
16]
17
18
19def RunSteps(api):
20  api.vars.setup()
21  checkout_root = api.checkout.default_checkout_root
22  api.checkout.bot_update(checkout_root=checkout_root)
23
24  # Run the infra tests.
25  repo_name = api.properties['repository'].split('/')[-1]
26  if repo_name.endswith('.git'):
27    repo_name = repo_name[:-len('.git')]
28  with api.context(cwd=checkout_root.join(repo_name),
29                   env=api.infra.go_env):
30    api.step('infra_tests', cmd=['make', '-C', 'infra/bots', 'test'])
31
32
33def GenTests(api):
34  yield (
35      api.test('infra_tests') +
36      api.properties(buildername='Housekeeper-PerCommit-InfraTests',
37                     repository='https://skia.googlesource.com/skia.git',
38                     revision='abc123',
39                     path_config='kitchen',
40                     swarm_out_dir='[SWARM_OUT_DIR]')
41  )
42