| 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 import buildbucket_client | 7 from common import buildbucket_client |
| 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 pipeline_wrapper import pipeline_handlers | 10 from pipeline_wrapper import pipeline_handlers |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 root_pipeline = TryJobPipeline( | 90 root_pipeline = TryJobPipeline( |
| 91 master_name, builder_name, build_number, good_revision, bad_revision, | 91 master_name, builder_name, build_number, good_revision, bad_revision, |
| 92 []) | 92 []) |
| 93 root_pipeline.start() | 93 root_pipeline.start() |
| 94 self.execute_queued_tasks() | 94 self.execute_queued_tasks() |
| 95 | 95 |
| 96 try_job = WfTryJob.Get(master_name, builder_name, build_number) | 96 try_job = WfTryJob.Get(master_name, builder_name, build_number) |
| 97 | 97 |
| 98 expected_compile_results = [ | 98 expected_compile_results = [ |
| 99 { | 99 { |
| 100 'result': [ | 100 'report': [ |
| 101 ['rev1', 'passed'], | 101 ['rev1', 'passed'], |
| 102 ['rev2', 'failed'] | 102 ['rev2', 'failed'] |
| 103 ], | 103 ], |
| 104 'url': 'url', | 104 'url': 'url', |
| 105 'try_job_id': '1', | 105 'try_job_id': '1', |
| 106 } | 106 } |
| 107 ] | 107 ] |
| 108 self.assertEqual(expected_compile_results, try_job.compile_results) | 108 self.assertEqual(expected_compile_results, try_job.compile_results) |
| 109 | 109 |
| 110 def testPipelineAbortedWithTryJobResult(self): | 110 def testPipelineAbortedWithTryJobResult(self): |
| (...skipping 15 matching lines...) Expand all Loading... |
| 126 builder_name = 'b' | 126 builder_name = 'b' |
| 127 build_number = 1 | 127 build_number = 1 |
| 128 | 128 |
| 129 root_pipeline = TryJobPipeline( | 129 root_pipeline = TryJobPipeline( |
| 130 master_name, builder_name, build_number, 'rev1', 'rev2', []) | 130 master_name, builder_name, build_number, 'rev1', 'rev2', []) |
| 131 root_pipeline._LogUnexpectedAbort(True) | 131 root_pipeline._LogUnexpectedAbort(True) |
| 132 | 132 |
| 133 try_job = WfTryJob.Get(master_name, builder_name, build_number) | 133 try_job = WfTryJob.Get(master_name, builder_name, build_number) |
| 134 | 134 |
| 135 self.assertIsNone(try_job) | 135 self.assertIsNone(try_job) |
| OLD | NEW |