| 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 from testing_utils import testing | 5 from testing_utils import testing |
| 6 | 6 |
| 7 from common.git_repository import GitRepository | 7 from common.git_repository import GitRepository |
| 8 from model import wf_analysis_status | 8 from model import wf_analysis_status |
| 9 from model.wf_try_job import WfTryJob | 9 from model.wf_try_job import WfTryJob |
| 10 from model.wf_try_job_data import WfTryJobData | 10 from model.wf_try_job_data import WfTryJobData |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 expected_culprit = 'rev2' | 143 expected_culprit = 'rev2' |
| 144 expected_compile_result = { | 144 expected_compile_result = { |
| 145 'report': { | 145 'report': { |
| 146 'result': { | 146 'result': { |
| 147 'rev1': 'passed', | 147 'rev1': 'passed', |
| 148 'rev2': 'failed' | 148 'rev2': 'failed' |
| 149 } | 149 } |
| 150 }, | 150 }, |
| 151 'try_job_id': try_job_id, | 151 'try_job_id': try_job_id, |
| 152 'culprit': { | 152 'culprit': { |
| 153 'revision': expected_culprit, | 153 'compile': { |
| 154 'commit_position': '2', | 154 'revision': 'rev2', |
| 155 'review_url': 'url_2' | 155 'commit_position': '2', |
| 156 'review_url': 'url_2' |
| 157 } |
| 156 } | 158 } |
| 157 } | 159 } |
| 158 | 160 |
| 159 self.assertEqual(expected_compile_result['culprit'], culprit) | 161 self.assertEqual(expected_compile_result['culprit'], culprit) |
| 160 | 162 |
| 161 try_job = WfTryJob.Get(master_name, builder_name, build_number) | 163 try_job = WfTryJob.Get(master_name, builder_name, build_number) |
| 162 self.assertEqual(expected_compile_result, try_job.compile_results[-1]) | 164 self.assertEqual(expected_compile_result, try_job.compile_results[-1]) |
| 163 self.assertEqual(wf_analysis_status.ANALYZED, try_job.status) | 165 self.assertEqual(wf_analysis_status.ANALYZED, try_job.status) |
| 164 | 166 |
| 165 try_job_data = WfTryJobData.Get(try_job_id) | 167 try_job_data = WfTryJobData.Get(try_job_id) |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 'a_test': { | 443 'a_test': { |
| 442 'a_test1': 'rev1', | 444 'a_test1': 'rev1', |
| 443 'a_test2': 'rev2', | 445 'a_test2': 'rev2', |
| 444 }, | 446 }, |
| 445 'b_test': { | 447 'b_test': { |
| 446 'b_test1': 'rev1', | 448 'b_test1': 'rev1', |
| 447 }, | 449 }, |
| 448 'c_test': 'rev2' | 450 'c_test': 'rev2' |
| 449 } | 451 } |
| 450 self.assertEqual(expected_culprit_data, try_job_data.culprits) | 452 self.assertEqual(expected_culprit_data, try_job_data.culprits) |
| OLD | NEW |