| OLD | NEW |
| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 # Identifies swarming tests and saves isolated data to them. | 348 # Identifies swarming tests and saves isolated data to them. |
| 349 result = swarming_util.GetIsolatedDataForFailedBuild( | 349 result = swarming_util.GetIsolatedDataForFailedBuild( |
| 350 master_name, builder_name, build_number, failed_steps, | 350 master_name, builder_name, build_number, failed_steps, |
| 351 http_client) | 351 http_client) |
| 352 if not result: | 352 if not result: |
| 353 return | 353 return |
| 354 | 354 |
| 355 for step_name, failed_step in failed_steps.iteritems(): | 355 for step_name, failed_step in failed_steps.iteritems(): |
| 356 if not failed_step.get('list_isolated_data'): # Non-swarming step. | 356 if not failed_step.get('list_isolated_data'): # Non-swarming step. |
| 357 continue | 357 continue # pragma: no cover. |
| 358 | 358 |
| 359 # Checks tests in one step and updates failed_step info if swarming. | 359 # Checks tests in one step and updates failed_step info if swarming. |
| 360 result = self._StartTestLevelCheckForFirstFailure( | 360 result = self._StartTestLevelCheckForFirstFailure( |
| 361 master_name, builder_name, build_number, step_name, | 361 master_name, builder_name, build_number, step_name, |
| 362 failed_step, http_client) | 362 failed_step, http_client) |
| 363 | 363 |
| 364 if result: # pragma: no cover | 364 if result: # pragma: no cover |
| 365 # Iterates backwards to get a more precise failed_steps info. | 365 # Iterates backwards to get a more precise failed_steps info. |
| 366 self._UpdateFirstFailureOnTestLevel( | 366 self._UpdateFirstFailureOnTestLevel( |
| 367 master_name, builder_name, build_number, step_name, | 367 master_name, builder_name, build_number, step_name, |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 | 462 |
| 463 failure_info['builds'] = builds | 463 failure_info['builds'] = builds |
| 464 failure_info['failed_steps'] = failed_steps | 464 failure_info['failed_steps'] = failed_steps |
| 465 | 465 |
| 466 analysis = WfAnalysis.Get(master_name, builder_name, build_number) | 466 analysis = WfAnalysis.Get(master_name, builder_name, build_number) |
| 467 analysis.not_passed_steps = build_info.not_passed_steps | 467 analysis.not_passed_steps = build_info.not_passed_steps |
| 468 analysis.build_failure_type = build_failure_type | 468 analysis.build_failure_type = build_failure_type |
| 469 analysis.put() | 469 analysis.put() |
| 470 | 470 |
| 471 return failure_info | 471 return failure_info |
| OLD | NEW |