| OLD | NEW |
| 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 import logging | 5 import logging |
| 6 | 6 |
| 7 from google.appengine.ext import ndb | 7 from google.appengine.ext import ndb |
| 8 | 8 |
| 9 from common import appengine_util | 9 from common import appengine_util |
| 10 from common import constants | 10 from common import constants |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 return need_new_try_job, last_pass, try_job_type, targeted_tests | 113 return need_new_try_job, last_pass, try_job_type, targeted_tests |
| 114 | 114 |
| 115 | 115 |
| 116 def _GetFailedTargetsFromSignals(signals, master_name, builder_name): | 116 def _GetFailedTargetsFromSignals(signals, master_name, builder_name): |
| 117 compile_targets = [] | 117 compile_targets = [] |
| 118 | 118 |
| 119 if not signals or 'compile' not in signals: | 119 if not signals or 'compile' not in signals: |
| 120 return compile_targets | 120 return compile_targets |
| 121 | 121 |
| 122 if signals['compile'].get('failed_output_nodes'): |
| 123 return signals['compile'].get('failed_output_nodes') |
| 124 |
| 122 strict_regex = waterfall_config.EnableStrictRegexForCompileLinkFailures( | 125 strict_regex = waterfall_config.EnableStrictRegexForCompileLinkFailures( |
| 123 master_name, builder_name) | 126 master_name, builder_name) |
| 124 for source_target in signals['compile'].get('failed_targets', []): | 127 for source_target in signals['compile'].get('failed_targets', []): |
| 125 # For link failures, we pass the executable targets directly to try-job, and | 128 # For link failures, we pass the executable targets directly to try-job, and |
| 126 # there is no 'source' for link failures. | 129 # there is no 'source' for link failures. |
| 127 # For compile failures, only pass the object files as the compile targets | 130 # For compile failures, only pass the object files as the compile targets |
| 128 # for the bots that we use strict regex to extract such information. | 131 # for the bots that we use strict regex to extract such information. |
| 129 if not source_target.get('source') or strict_regex: | 132 if not source_target.get('source') or strict_regex: |
| 130 compile_targets.append(source_target.get('target')) | 133 compile_targets.append(source_target.get('target')) |
| 131 | 134 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 pipeline.pipeline_status_path, try_job_type) | 198 pipeline.pipeline_status_path, try_job_type) |
| 196 else: # pragma: no cover | 199 else: # pragma: no cover |
| 197 logging_str = ( | 200 logging_str = ( |
| 198 'Try job was scheduled for build %s, %s, %s: %s because of %s ' | 201 'Try job was scheduled for build %s, %s, %s: %s because of %s ' |
| 199 'failure.') % ( | 202 'failure.') % ( |
| 200 master_name, builder_name, build_number, | 203 master_name, builder_name, build_number, |
| 201 pipeline.pipeline_status_path, try_job_type) | 204 pipeline.pipeline_status_path, try_job_type) |
| 202 logging.info(logging_str) | 205 logging.info(logging_str) |
| 203 | 206 |
| 204 return failure_result_map | 207 return failure_result_map |
| OLD | NEW |