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

Side by Side Diff: appengine/findit/waterfall/detect_first_failure_pipeline.py

Issue 2027333002: [Findit] don't included skipped or unknown tests in swarming tasks into failed tests. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Make sure only collect swarming result for targeted tests. Created 4 years, 6 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 import base64 5 import base64
6 import json 6 import json
7 7
8 from common import constants 8 from common import constants
9 from common.http_client_appengine import HttpClientAppengine as HttpClient 9 from common.http_client_appengine import HttpClientAppengine as HttpClient
10 from common.pipeline_wrapper import BasePipeline 10 from common.pipeline_wrapper import BasePipeline
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 self, json_data, step, failed_step=None): 174 self, json_data, step, failed_step=None):
175 """Parses the json data and saves all the reliable failures to the step.""" 175 """Parses the json data and saves all the reliable failures to the step."""
176 failed_test_log = {} 176 failed_test_log = {}
177 if failed_step: 177 if failed_step:
178 failed_step['tests'] = {} 178 failed_step['tests'] = {}
179 179
180 for iteration in json_data.get('per_iteration_data'): 180 for iteration in json_data.get('per_iteration_data'):
181 for test_name in iteration.keys(): 181 for test_name in iteration.keys():
182 is_reliable_failure = True 182 is_reliable_failure = True
183 183
184 if any(test['status'] == 'SUCCESS' for test in iteration[test_name]): 184 if (any(test['status'] in ['SUCCESS', 'SKIPPED', 'UNKNOWN']
185 for test in iteration[test_name])):
185 # Ignore the test if any of the attempts were 'SUCCESS'. 186 # Ignore the test if any of the attempts were 'SUCCESS'.
stgao 2016/06/02 01:31:20 comment needs updating
chanli 2016/06/02 22:40:09 Done.
186 is_reliable_failure = False 187 is_reliable_failure = False
187 188
188 if is_reliable_failure: 189 if is_reliable_failure:
189 if failed_step: 190 if failed_step:
190 # Adds the test to failed_step. 191 # Adds the test to failed_step.
191 failed_step['tests'][test_name] = { 192 failed_step['tests'][test_name] = {
192 'current_failure': failed_step['current_failure'], 193 'current_failure': failed_step['current_failure'],
193 'first_failure': failed_step['current_failure'], 194 'first_failure': failed_step['current_failure'],
194 } 195 }
195 if failed_step.get('last_pass'): 196 if failed_step.get('last_pass'):
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 463
463 failure_info['builds'] = builds 464 failure_info['builds'] = builds
464 failure_info['failed_steps'] = failed_steps 465 failure_info['failed_steps'] = failed_steps
465 466
466 analysis = WfAnalysis.Get(master_name, builder_name, build_number) 467 analysis = WfAnalysis.Get(master_name, builder_name, build_number)
467 analysis.not_passed_steps = build_info.not_passed_steps 468 analysis.not_passed_steps = build_info.not_passed_steps
468 analysis.build_failure_type = build_failure_type 469 analysis.build_failure_type = build_failure_type
469 analysis.put() 470 analysis.put()
470 471
471 return failure_info 472 return failure_info
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698