Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: scripts/slave/recipes/ios/unified_builder_tester.py

Issue 2455433002: Convert chromium.mac, chromium.fyi iOS bots to run tests on Swarming (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 DEPS = [ 5 DEPS = [
6 'ios', 6 'ios',
7 'recipe_engine/platform', 7 'recipe_engine/platform',
8 'recipe_engine/properties', 8 'recipe_engine/properties',
9 'recipe_engine/raw_io',
9 ] 10 ]
10 11
11 def RunSteps(api): 12 def RunSteps(api):
12 api.ios.host_info() 13 api.ios.host_info()
13 api.ios.checkout() 14 api.ios.checkout()
14 api.ios.read_build_config() 15 api.ios.read_build_config()
15 api.ios.build() 16 api.ios.build()
16 api.ios.test() 17 api.ios.test_swarming()
17 18
18 def GenTests(api): 19 def GenTests(api):
19 yield ( 20 yield (
20 api.test('basic') 21 api.test('basic')
21 + api.platform('mac', 64) 22 + api.platform('mac', 64)
22 + api.properties( 23 + api.properties(
23 buildername='ios', 24 buildername='ios',
24 buildnumber='0', 25 buildnumber='0',
25 mastername='chromium.fake', 26 mastername='chromium.fake',
26 slavename='fake-vm', 27 slavename='fake-vm',
(...skipping 23 matching lines...) Expand all
50 'os': '7.1', 51 'os': '7.1',
51 }, 52 },
52 { 53 {
53 'app': 'fake_eg_test_host', 54 'app': 'fake_eg_test_host',
54 'device type': 'fake device 3', 55 'device type': 'fake device 3',
55 'os': '9.3', 56 'os': '9.3',
56 'xctest': True, 57 'xctest': True,
57 }, 58 },
58 ], 59 ],
59 }) 60 })
61 + api.step_data(
62 'bootstrap swarming.swarming.py --version',
63 stdout=api.raw_io.output('1.2.3'),
64 )
60 ) 65 )
61 66
62 yield ( 67 yield (
63 api.test('no_tests')
64 + api.platform('mac', 64)
65 + api.properties(
66 buildername='ios',
67 buildnumber='0',
68 mastername='chromium.fake',
69 slavename='fake-vm',
70 path_config='kitchen',
71 )
72 + api.ios.make_test_build_config({
73 'xcode version': 'fake xcode version',
74 'GYP_DEFINES': {
75 'fake gyp define 1': 'fake value 1',
76 'fake gyp define 2': 'fake value 2',
77 },
78 'configuration': 'Release',
79 'sdk': 'iphoneos8.0',
80 'tests': [
81 ],
82 })
83 )
84
85 yield (
86 api.test('goma') 68 api.test('goma')
87 + api.platform('mac', 64) 69 + api.platform('mac', 64)
88 + api.properties( 70 + api.properties(
89 buildername='ios', 71 buildername='ios',
90 buildnumber='0', 72 buildnumber='0',
91 mastername='chromium.fake', 73 mastername='chromium.fake',
92 slavename='fake-vm', 74 slavename='fake-vm',
93 path_config='kitchen', 75 path_config='kitchen',
94 ) 76 )
95 + api.ios.make_test_build_config({ 77 + api.ios.make_test_build_config({
96 'xcode version': 'fake xcode version', 78 'xcode version': 'fake xcode version',
97 'GYP_DEFINES': { 79 'GYP_DEFINES': {
98 'fake gyp define 1': 'fake value 1', 80 'fake gyp define 1': 'fake value 1',
99 'fake gyp define 2': 'fake value 2', 81 'fake gyp define 2': 'fake value 2',
100 'use_goma': '1', 82 'use_goma': '1',
101 }, 83 },
102 'configuration': 'Release', 84 'configuration': 'Release',
103 'sdk': 'iphoneos8.0', 85 'sdk': 'iphoneos8.0',
104 'tests': [ 86 'tests': [
105 ], 87 ],
106 }) 88 })
89 + api.step_data(
90 'bootstrap swarming.swarming.py --version',
91 stdout=api.raw_io.output('1.2.3'),
92 )
107 ) 93 )
108 94
109 yield ( 95 yield (
110 api.test('goma_canary') 96 api.test('goma_canary')
111 + api.platform('mac', 64) 97 + api.platform('mac', 64)
112 + api.properties( 98 + api.properties(
113 buildername='ios', 99 buildername='ios',
114 buildnumber='0', 100 buildnumber='0',
115 mastername='chromium.fake', 101 mastername='chromium.fake',
116 slavename='fake-vm', 102 slavename='fake-vm',
117 path_config='kitchen', 103 path_config='kitchen',
118 ) 104 )
119 + api.ios.make_test_build_config({ 105 + api.ios.make_test_build_config({
120 'xcode version': 'fake xcode version', 106 'xcode version': 'fake xcode version',
121 'GYP_DEFINES': { 107 'GYP_DEFINES': {
122 'fake gyp define 1': 'fake value 1', 108 'fake gyp define 1': 'fake value 1',
123 'fake gyp define 2': 'fake value 2', 109 'fake gyp define 2': 'fake value 2',
124 'use_goma': '1', 110 'use_goma': '1',
125 }, 111 },
126 'use_goma_canary': True, 112 'use_goma_canary': True,
127 'configuration': 'Release', 113 'configuration': 'Release',
128 'sdk': 'iphoneos8.0', 114 'sdk': 'iphoneos8.0',
129 'tests': [ 115 'tests': [
130 ], 116 ],
131 }) 117 })
132 )
133
134 yield (
135 api.test('test_failure')
136 + api.platform('mac', 64)
137 + api.properties(
138 buildername='ios',
139 buildnumber='0',
140 mastername='chromium.fake',
141 slavename='fake-vm',
142 path_config='kitchen',
143 )
144 + api.ios.make_test_build_config({
145 'xcode version': 'fake xcode version',
146 'GYP_DEFINES': {
147 'fake gyp define 1': 'fake value 1',
148 'fake gyp define 2': 'fake value 2',
149 },
150 'configuration': 'Debug',
151 'sdk': 'iphonesimulator8.0',
152 'tests': [
153 {
154 'app': 'fake tests 1',
155 'device type': 'fake device',
156 'os': '8.0',
157 },
158 {
159 'app': 'fake tests 2',
160 'device type': 'fake device',
161 'os': '7.1',
162 },
163 ],
164 })
165 + api.step_data( 118 + api.step_data(
166 'fake tests 1 (fake device iOS 8.0)', 119 'bootstrap swarming.swarming.py --version',
167 retcode=1 120 stdout=api.raw_io.output('1.2.3'),
168 ) 121 )
169 ) 122 )
170
171 yield (
172 api.test('infrastructure_failure')
173 + api.platform('mac', 64)
174 + api.properties(
175 buildername='ios',
176 buildnumber='0',
177 mastername='chromium.fake',
178 slavename='fake-vm',
179 path_config='kitchen',
180 )
181 + api.ios.make_test_build_config({
182 'xcode version': 'fake xcode version',
183 'GYP_DEFINES': {
184 'fake gyp define 1': 'fake value 1',
185 'fake gyp define 2': 'fake value 2',
186 },
187 'configuration': 'Debug',
188 'sdk': 'iphonesimulator8.0',
189 'tests': [
190 {
191 'app': 'fake tests 1',
192 'device type': 'fake device',
193 'os': '8.0',
194 },
195 {
196 'app': 'fake tests 2',
197 'device type': 'fake device',
198 'os': '7.1',
199 },
200 ],
201 })
202 + api.step_data(
203 'fake tests 1 (fake device iOS 8.0)',
204 retcode=2,
205 )
206 )
207
208 yield (
209 api.test('multiple_failures')
210 + api.platform('mac', 64)
211 + api.properties(
212 buildername='ios',
213 buildnumber='0',
214 mastername='chromium.fake',
215 slavename='fake-vm',
216 path_config='kitchen',
217 )
218 + api.ios.make_test_build_config({
219 'xcode version': 'fake xcode version',
220 'GYP_DEFINES': {
221 'fake gyp define 1': 'fake value 1',
222 'fake gyp define 2': 'fake value 2',
223 },
224 'configuration': 'Debug',
225 'sdk': 'iphonesimulator7.1',
226 'tests': [
227 {
228 'app': 'fake tests 1',
229 'device type': 'fake device',
230 'os': '8.1',
231 },
232 {
233 'app': 'fake tests 2',
234 'device type': 'fake device',
235 'os': '8.1',
236 },
237 {
238 'app': 'fake tests 3',
239 'device type': 'fake device',
240 'os': '8.1',
241 },
242 {
243 'app': 'fake tests 4',
244 'device type': 'fake device',
245 'os': '8.1',
246 },
247 {
248 'app': 'fake tests 5',
249 'device type': 'fake device',
250 'os': '8.1',
251 },
252 {
253 'app': 'fake tests 6',
254 'device type': 'fake device',
255 'os': '8.1',
256 },
257 ],
258 })
259 + api.step_data(
260 'fake tests 2 (fake device iOS 8.1)',
261 retcode=1
262 )
263 + api.step_data(
264 'fake tests 3 (fake device iOS 8.1)',
265 retcode=1
266 )
267 + api.step_data(
268 'fake tests 5 (fake device iOS 8.1)',
269 retcode=2
270 )
271 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698