Chromium Code Reviews| 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 common.waterfall import failure_type | 5 from common.waterfall import failure_type |
| 6 from model import analysis_status | 6 from model import analysis_status |
| 7 from model.wf_try_job import WfTryJob | 7 from model.wf_try_job import WfTryJob |
| 8 from waterfall import try_job_util | 8 from waterfall import try_job_util |
| 9 from waterfall.test import wf_testcase | 9 from waterfall.test import wf_testcase |
| 10 from waterfall.try_job_type import TryJobType | 10 from waterfall.try_job_type import TryJobType |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 401 {'source': 'b.cc', 'target': 'b.o'}, | 401 {'source': 'b.cc', 'target': 'b.o'}, |
| 402 ] | 402 ] |
| 403 } | 403 } |
| 404 } | 404 } |
| 405 | 405 |
| 406 self.assertEqual( | 406 self.assertEqual( |
| 407 try_job_util._GetFailedTargetsFromSignals( | 407 try_job_util._GetFailedTargetsFromSignals( |
| 408 signals, 'master1', 'builder1'), | 408 signals, 'master1', 'builder1'), |
| 409 ['b.o']) | 409 ['b.o']) |
| 410 | 410 |
| 411 def testGetSuspectsForCompileFailureFromHeuristicResult(self): | 411 def testGetSuspectsFromHeuristicResult(self): |
| 412 heuristic_result = { | 412 heuristic_result = { |
| 413 'failures': [ | 413 'failures': [ |
| 414 { | 414 { |
| 415 'step_name': 'compile', | 415 'step_name': 'compile', |
| 416 'suspected_cls': [ | 416 'suspected_cls': [ |
| 417 { | 417 { |
| 418 'revision': 'r1', | 418 'revision': 'r1', |
| 419 }, | 419 }, |
| 420 { | 420 { |
| 421 'revision': 'r2', | 421 'revision': 'r2', |
| 422 }, | 422 }, |
| 423 ], | 423 ], |
| 424 }, | 424 }, |
| 425 { | 425 { |
| 426 'step_name': 'steps' | 426 'step_name': 'steps', |
| 427 'suspected_cls': [ | |
| 428 { | |
| 429 'revision': 'r1', | |
| 430 }, | |
| 431 { | |
| 432 'revision': 'r2', | |
| 433 }, | |
| 434 ], | |
| 427 }, | 435 }, |
| 428 ] | 436 ] |
| 429 } | 437 } |
| 430 expected_suspected_revisions = ['r1', 'r2'] | 438 expected_suspected_revisions = ['r1', 'r2'] |
| 431 self.assertEqual( | 439 self.assertEqual( |
| 432 expected_suspected_revisions, | 440 expected_suspected_revisions, |
| 433 try_job_util._GetSuspectsForCompileFailureFromHeuristicResult( | 441 try_job_util._GetSuspectsFromHeuristicResult( |
| 434 heuristic_result)) | 442 heuristic_result)) |
|
lijeffrey
2016/04/27 23:34:08
nit: does this fit on one line?
chanli
2016/04/28 17:36:04
Done.
| |
| OLD | NEW |