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

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

Issue 1882273002: [Findit] Check the explicit culprit from try-job if it is set. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « appengine/findit/waterfall/identify_try_job_culprit_pipeline.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 analysis_status 8 from model import 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 'rev2', 68 'rev2',
69 IdentifyTryJobCulpritPipeline._GetFailedRevisionFromCompileResult( 69 IdentifyTryJobCulpritPipeline._GetFailedRevisionFromCompileResult(
70 { 70 {
71 'report': { 71 'report': {
72 'result': { 72 'result': {
73 'rev1': 'passed', 73 'rev1': 'passed',
74 'rev2': 'failed' 74 'rev2': 'failed'
75 } 75 }
76 } 76 }
77 })) 77 }))
78 self.assertEqual(
79 'rev1',
80 IdentifyTryJobCulpritPipeline._GetFailedRevisionFromCompileResult(
81 {
82 'report': {
83 'result': {
84 'rev1': 'failed',
85 'rev2': 'failed'
86 },
87 'culprit': 'rev1',
88 }
89 }))
78 90
79 def testIdentifyCulpritForCompileTryJobNoCulprit(self): 91 def testIdentifyCulpritForCompileTryJobNoCulprit(self):
80 master_name = 'm' 92 master_name = 'm'
81 builder_name = 'b' 93 builder_name = 'b'
82 build_number = 1 94 build_number = 1
83 try_job_id = '1' 95 try_job_id = '1'
84 96
85 try_job = WfTryJob.Create(master_name, builder_name, build_number) 97 try_job = WfTryJob.Create(master_name, builder_name, build_number)
86 try_job.put() 98 try_job.put()
87 try_job_data = WfTryJobData.Create(try_job_id) 99 try_job_data = WfTryJobData.Create(try_job_id)
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 'a_test': { 455 'a_test': {
444 'a_test1': 'rev1', 456 'a_test1': 'rev1',
445 'a_test2': 'rev2', 457 'a_test2': 'rev2',
446 }, 458 },
447 'b_test': { 459 'b_test': {
448 'b_test1': 'rev1', 460 'b_test1': 'rev1',
449 }, 461 },
450 'c_test': 'rev2' 462 'c_test': 'rev2'
451 } 463 }
452 self.assertEqual(expected_culprit_data, try_job_data.culprits) 464 self.assertEqual(expected_culprit_data, try_job_data.culprits)
OLDNEW
« no previous file with comments | « appengine/findit/waterfall/identify_try_job_culprit_pipeline.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698