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

Side by Side Diff: scripts/slave/recipe_modules/skia/api.py

Issue 1862713002: Convert Coverage flavor and bot to Swarming (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build@master
Patch Set: Fix expectations Created 4 years, 8 months 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 5
6 import json 6 import json
7 import os 7 import os
8 import re 8 import re
9 import sys 9 import sys
10 10
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 self.out_dir = self.slave_dir.join('out') 194 self.out_dir = self.slave_dir.join('out')
195 self.local_skp_dir = self.slave_dir.join('skps') 195 self.local_skp_dir = self.slave_dir.join('skps')
196 else: 196 else:
197 self.out_dir = self.m.path['checkout'].join('out', self.builder_name) 197 self.out_dir = self.m.path['checkout'].join('out', self.builder_name)
198 self.local_skp_dir = self.slave_dir.join('playback', 'skps') 198 self.local_skp_dir = self.slave_dir.join('playback', 'skps')
199 self.tmp_dir = self.m.path['slave_build'].join('tmp') 199 self.tmp_dir = self.m.path['slave_build'].join('tmp')
200 200
201 self.gsutil_env_chromium_skia_gm = self.gsutil_env(BOTO_CHROMIUM_SKIA_GM) 201 self.gsutil_env_chromium_skia_gm = self.gsutil_env(BOTO_CHROMIUM_SKIA_GM)
202 # TODO(borenet): This works on GCE instance because we fall back on 202 # TODO(borenet): This works on GCE instance because we fall back on
203 # service account auth. What about our local bots? 203 # service account auth. What about our local bots?
204 self.gsutil_env_skia_infra = self.gsutil_env(None) 204 self.gsutil_env_skia_infra = self.gsutil_env(None)
borenet 2016/04/15 16:19:33 I think we can get rid of this now.
rmistry 2016/04/15 17:48:01 Done.
205 205
206 self.device_dirs = None 206 self.device_dirs = None
207 self._ccache = None 207 self._ccache = None
208 self._checked_for_ccache = False 208 self._checked_for_ccache = False
209 self.configuration = self.builder_spec['configuration'] 209 self.configuration = self.builder_spec['configuration']
210 self.default_env.update({'SKIA_OUT': self.out_dir, 210 self.default_env.update({'SKIA_OUT': self.out_dir,
211 'BUILDTYPE': self.configuration}) 211 'BUILDTYPE': self.configuration})
212 self.default_env.update(self.builder_spec['env']) 212 self.default_env.update(self.builder_spec['env'])
213 self.build_targets = [str(t) for t in self.builder_spec['build_targets']] 213 self.build_targets = [str(t) for t in self.builder_spec['build_targets']]
214 if 'Android' in self.builder_name and self.running_in_swarming: 214 if 'Android' in self.builder_name and self.running_in_swarming:
(...skipping 13 matching lines...) Expand all
228 self.dm_dir = self.slave_dir.join('dm') 228 self.dm_dir = self.slave_dir.join('dm')
229 self.perf_data_dir = self.slave_dir.join('perfdata', self.builder_name, 229 self.perf_data_dir = self.slave_dir.join('perfdata', self.builder_name,
230 'data') 230 'data')
231 self.dm_flags = self.builder_spec['dm_flags'] 231 self.dm_flags = self.builder_spec['dm_flags']
232 self.nanobench_flags = self.builder_spec['nanobench_flags'] 232 self.nanobench_flags = self.builder_spec['nanobench_flags']
233 233
234 self.flavor = self.get_flavor(self.builder_cfg) 234 self.flavor = self.get_flavor(self.builder_cfg)
235 235
236 def run_steps(self): 236 def run_steps(self):
237 """Compile, run tests, perf, etc.""" 237 """Compile, run tests, perf, etc."""
238 self.compile_steps() 238 self.compile_steps()
borenet 2016/04/15 16:19:33 Needs: if self.do_compile_steps:
rmistry 2016/04/15 17:48:01 Done.
239 if self.do_test_steps: 239 if self.do_test_steps:
240 self.test_steps() 240 self.test_steps()
241 if self.do_perf_steps: 241 if self.do_perf_steps:
242 self.perf_steps() 242 self.perf_steps()
243 243
244 if self.do_test_steps or self.do_perf_steps: 244 if self.do_test_steps or self.do_perf_steps:
245 self.cleanup_steps() 245 self.cleanup_steps()
246 246
247 if self.failed: 247 if self.failed:
248 raise self.m.step.StepFailure('Failed build steps: %s' % 248 raise self.m.step.StepFailure('Failed build steps: %s' %
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 env = dict(env or {}) 388 env = dict(env or {})
389 env.update(self.default_env) 389 env.update(self.default_env)
390 try: 390 try:
391 return steptype(name=name, env=env, **kwargs) 391 return steptype(name=name, env=env, **kwargs)
392 except self.m.step.StepFailure as e: 392 except self.m.step.StepFailure as e:
393 if abort_on_failure: 393 if abort_on_failure:
394 raise # pragma: no cover 394 raise # pragma: no cover
395 if fail_build_on_failure: 395 if fail_build_on_failure:
396 self.failed.append(e) 396 self.failed.append(e)
397 397
398 def gsutil_upload(self, name, source, bucket, dest):
399 """Upload to Google Storage without using a .boto file."""
400 self.run(
401 self.m.gsutil.upload,
402 name,
403 source=source,
404 bucket=bucket,
405 dest=dest,
406 args=['-R'],
407 env=self.gsutil_env_skia_infra,
408 abort_on_failure=False)
409
410 def download_dir(self, version_file, gs_path_tmpl, tmp_dir, host_path, 398 def download_dir(self, version_file, gs_path_tmpl, tmp_dir, host_path,
411 test_expected_version, test_actual_version, 399 test_expected_version, test_actual_version,
412 running_in_swarming): 400 running_in_swarming):
413 """Download the given directory from Google Storage if necessary. 401 """Download the given directory from Google Storage if necessary.
414 402
415 Return the downloaded version. 403 Return the downloaded version.
416 """ 404 """
417 actual_version_file = self.m.path.join(tmp_dir, version_file) 405 actual_version_file = self.m.path.join(tmp_dir, version_file)
418 # If we're running as a Swarming task, we should've received the test inputs 406 # If we're running as a Swarming task, we should've received the test inputs
419 # via the isolate server. Only download if we're not running in Swarming. 407 # via the isolate server. Only download if we're not running in Swarming.
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 # Don't bother to include role, which is always Test. 857 # Don't bother to include role, which is always Test.
870 # TryBots are uploaded elsewhere so they can use the same key. 858 # TryBots are uploaded elsewhere so they can use the same key.
871 blacklist = ['role', 'is_trybot'] 859 blacklist = ['role', 'is_trybot']
872 860
873 flat = [] 861 flat = []
874 for k in sorted(self.builder_cfg.keys()): 862 for k in sorted(self.builder_cfg.keys()):
875 if k not in blacklist: 863 if k not in blacklist:
876 flat.append(k) 864 flat.append(k)
877 flat.append(self.builder_cfg[k]) 865 flat.append(self.builder_cfg[k])
878 return flat 866 return flat
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698