| 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 json | 5 import json |
| 6 | 6 |
| 7 from testing_utils import testing | 7 from testing_utils import testing |
| 8 | 8 |
| 9 from common import buildbucket_client | 9 from common import buildbucket_client |
| 10 from common.git_repository import GitRepository | 10 from common.git_repository import GitRepository |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 'rev1': 'passed', | 126 'rev1': 'passed', |
| 127 'rev2': 'failed' | 127 'rev2': 'failed' |
| 128 }, | 128 }, |
| 129 'metadata': { | 129 'metadata': { |
| 130 'regression_range_size': 2 | 130 'regression_range_size': 2 |
| 131 } | 131 } |
| 132 }, | 132 }, |
| 133 'url': 'url', | 133 'url': 'url', |
| 134 'try_job_id': '1', | 134 'try_job_id': '1', |
| 135 'culprit': { | 135 'culprit': { |
| 136 'revision': 'rev2', | 136 'compile': { |
| 137 'commit_position': '2', | 137 'revision': 'rev2', |
| 138 'review_url': 'url_2' | 138 'commit_position': '2', |
| 139 'review_url': 'url_2' |
| 140 } |
| 139 } | 141 } |
| 140 } | 142 } |
| 141 ] | 143 ] |
| 142 self.assertEqual(expected_try_job_results, try_job.compile_results) | 144 self.assertEqual(expected_try_job_results, try_job.compile_results) |
| 143 | 145 |
| 144 def testPipelineAbortedWithTryJobResult(self): | 146 def testPipelineAbortedWithTryJobResult(self): |
| 145 master_name = 'm' | 147 master_name = 'm' |
| 146 builder_name = 'b' | 148 builder_name = 'b' |
| 147 build_number = 1 | 149 build_number = 1 |
| 148 | 150 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 162 build_number = 1 | 164 build_number = 1 |
| 163 | 165 |
| 164 root_pipeline = TryJobPipeline( | 166 root_pipeline = TryJobPipeline( |
| 165 master_name, builder_name, build_number, 'rev1', 'rev2', ['rev2'], | 167 master_name, builder_name, build_number, 'rev1', 'rev2', ['rev2'], |
| 166 'compile', []) | 168 'compile', []) |
| 167 root_pipeline._LogUnexpectedAbort(True) | 169 root_pipeline._LogUnexpectedAbort(True) |
| 168 | 170 |
| 169 try_job = WfTryJob.Get(master_name, builder_name, build_number) | 171 try_job = WfTryJob.Get(master_name, builder_name, build_number) |
| 170 | 172 |
| 171 self.assertIsNone(try_job) | 173 self.assertIsNone(try_job) |
| OLD | NEW |