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

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

Issue 2002153008: recipe_tryjob: Actually fail on bad tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | scripts/slave/recipes/infra/recipe_roll_tryjob.expected/three_patches_fail_not_ok.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 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 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 import collections 5 import collections
6 import hashlib 6 import hashlib
7 import json 7 import json
8 import re 8 import re
9 9
10 from recipe_engine import recipe_api 10 from recipe_engine import recipe_api
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 recipe_configs = { 322 recipe_configs = {
323 p: self._get_project_config(p) for p in all_projects} 323 p: self._get_project_config(p) for p in all_projects}
324 324
325 deps, downstream_projects = get_deps_info(all_projects, recipe_configs) 325 deps, downstream_projects = get_deps_info(all_projects, recipe_configs)
326 should_fail_build_mapping = self.get_fail_build_info( 326 should_fail_build_mapping = self.get_fail_build_info(
327 downstream_projects, patches) 327 downstream_projects, patches)
328 328
329 projs_to_test, locations = self._checkout_projects( 329 projs_to_test, locations = self._checkout_projects(
330 root_dir, url_mapping, deps, downstream_projects, patches) 330 root_dir, url_mapping, deps, downstream_projects, patches)
331 331
332 failures = [] 332 bad_projects = []
333 try: 333 for proj in projs_to_test:
334 with self.m.step.defer_results(): 334 deps_locs = {dep: locations[dep] for dep in deps[proj]}
335 for proj in projs_to_test:
336 deps_locs = {dep: locations[dep] for dep in deps[proj]}
337 335
338 simulation_result = self.simulation_test( 336 try:
339 proj, recipe_configs[proj], locations[proj], deps_locs) 337 self.simulation_test(
338 proj, recipe_configs[proj], locations[proj], deps_locs)
339 except recipe_api.StepFailure:
340 if should_fail_build_mapping.get(proj, True):
341 bad_projects.append(proj)
340 342
341 try: 343 if bad_projects:
342 simulation_result.get_result() 344 raise recipe_api.StepFailure(
343 except recipe_api.StepFailure as f: 345 "One or more projects failed tests: %s" % (
344 if should_fail_build_mapping.get(proj): 346 ','.join(bad_projects)))
345 failures.append(f)
346 except recipe_api.AggregatedStepFailure:
347 if failures:
348 raise
349 347
350 348
351
352
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/infra/recipe_roll_tryjob.expected/three_patches_fail_not_ok.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698