• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2017 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
6DEPS = [
7  'checkout',
8  'recipe_engine/file',
9  'recipe_engine/path',
10  'recipe_engine/platform',
11  'recipe_engine/properties',
12  'run',
13  'vars',
14]
15
16
17def RunSteps(api):
18  api.vars.setup()
19
20  bot_update = True
21  if 'NoDEPS' in api.properties['buildername']:
22    bot_update = False
23
24  checkout_root = api.checkout.default_checkout_root
25  checkout_chromium = False
26  checkout_flutter = False
27  extra_gclient_env = {}
28  flutter_android = False
29  parent_rev = False
30  if 'CommandBuffer' in api.vars.builder_name:
31    checkout_chromium = True
32  if 'RecreateSKPs' in api.vars.builder_name:
33    checkout_chromium = True
34    extra_gclient_env['CPPFLAGS'] = (
35        '-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1')
36  if 'Flutter' in api.vars.builder_name:
37    checkout_root = checkout_root.join('flutter')
38    checkout_flutter = True
39    if 'Android' in api.vars.builder_name:
40      flutter_android = True
41  if 'ParentRevision' in api.vars.builder_name:
42    parent_rev = True
43
44  if bot_update:
45    api.checkout.bot_update(
46        checkout_root=checkout_root,
47        checkout_chromium=checkout_chromium,
48        checkout_flutter=checkout_flutter,
49        extra_gclient_env=extra_gclient_env,
50        flutter_android=flutter_android,
51        parent_rev=parent_rev)
52  else:
53    api.checkout.git(checkout_root=api.path['start_dir'])
54  api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
55
56
57TEST_BUILDERS = [
58  'Build-Win-Clang-x86_64-Release-ParentRevision',
59  'Build-Mac-Clang-x86_64-Debug-CommandBuffer',
60  'Housekeeper-Weekly-RecreateSKPs',
61]
62
63
64def GenTests(api):
65  for buildername in TEST_BUILDERS:
66    test = (
67        api.test(buildername) +
68        api.properties(buildername=buildername,
69                       repository='https://skia.googlesource.com/skia.git',
70                       revision='abc123',
71                       path_config='kitchen',
72                       swarm_out_dir='[SWARM_OUT_DIR]')
73    )
74    if 'Win' in buildername and not 'LenovoYogaC630' in buildername:
75      test += api.platform('win', 64)
76    yield test
77
78  buildername = 'Build-Win-Clang-x86_64-Release-ParentRevision'
79  yield (
80      api.test('parent_revision_trybot') +
81      api.properties(buildername=buildername,
82                     repository='https://skia.googlesource.com/skia.git',
83                     revision='abc123',
84                     path_config='kitchen',
85                     swarm_out_dir='[SWARM_OUT_DIR]',
86                     patch_issue=456789,
87                     patch_set=12,
88                     patch_ref='refs/changes/89/456789/12',
89                     patch_repo='https://skia.googlesource.com/skia.git',
90                     patch_storage='gerrit') +
91      api.platform('win', 64)
92  )
93
94  buildername = 'Build-Debian9-Clang-arm-Release-Flutter_Android'
95  yield (
96      api.test('flutter_trybot') +
97      api.properties(
98          repository='https://skia.googlesource.com/skia.git',
99          buildername=buildername,
100          path_config='kitchen',
101          swarm_out_dir='[SWARM_OUT_DIR]',
102          revision='abc123',
103          patch_issue=456789,
104          patch_set=12,
105          patch_ref='refs/changes/89/456789/12',
106          patch_repo='https://skia.googlesource.com/skia.git',
107          patch_storage='gerrit') +
108      api.path.exists(
109          api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
110      )
111  )
112
113  builder = 'Build-Debian9-Clang-x86_64-Release-NoDEPS'
114  yield (
115      api.test(builder) +
116      api.properties(buildername=builder,
117                     repository='https://skia.googlesource.com/skia.git',
118                     revision='abc123',
119                     path_config='kitchen',
120                     swarm_out_dir='[SWARM_OUT_DIR]',
121                     patch_issue=456789,
122                     patch_set=12,
123                     patch_ref='refs/changes/89/456789/12',
124                     patch_repo='https://skia.googlesource.com/skia.git',
125                     patch_storage='gerrit') +
126      api.path.exists(api.path['start_dir'].join('skp_output'))
127  )
128
129  buildername = 'Build-Debian9-GCC-x86_64-Release'
130  yield (
131      api.test('cross_repo_trybot') +
132      api.properties(
133          repository='https://skia.googlesource.com/parent_repo.git',
134          buildername=buildername,
135          path_config='kitchen',
136          swarm_out_dir='[SWARM_OUT_DIR]',
137          revision='abc123',
138          patch_issue=456789,
139          patch_set=12,
140          patch_ref='refs/changes/89/456789/12',
141          patch_repo='https://skia.googlesource.com/skia.git',
142          patch_storage='gerrit') +
143      api.path.exists(
144          api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
145      )
146  )
147  yield (
148      api.test('trybot') +
149      api.properties(buildername=buildername,
150                     repository='https://skia.googlesource.com/skia.git',
151                     revision='abc123',
152                     path_config='kitchen',
153                     patch_issue=456789,
154                     patch_set=12,
155                     patch_ref='refs/changes/89/456789/12',
156                     patch_repo='https://skia.googlesource.com/skia.git',
157                     patch_storage='gerrit',
158                     swarm_out_dir='[SWARM_OUT_DIR]')
159  )
160