Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: appengine/findit/waterfall/test/try_job_util_test.py

Issue 1924823003: [Findit] Use heuristic analysis result for test try jobs(Findit side). (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: . Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 ],
stgao 2016/04/28 17:37:49 May consider adding a separate testcase for test f
chanli 2016/04/28 22:13:14 Done.
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(heuristic_result))
434 heuristic_result))
OLDNEW
« no previous file with comments | « appengine/findit/waterfall/schedule_try_job_pipeline.py ('k') | appengine/findit/waterfall/try_job_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698