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

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

Issue 1778153002: [Findit] Strip platform from step_name before triggering try job. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 9 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 testing_utils import testing 5 from testing_utils import testing
6 6
7 from model import wf_analysis_status 7 from model import wf_analysis_status
8 from model.wf_analysis import WfAnalysis 8 from model.wf_analysis import WfAnalysis
9 from model.wf_try_job import WfTryJob 9 from model.wf_try_job import WfTryJob
10 from waterfall import try_job_util 10 from waterfall import try_job_util
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 self.assertEqual(expected_failure_result_map, failure_result_map) 266 self.assertEqual(expected_failure_result_map, failure_result_map)
267 self.assertEqual(222, last_pass) 267 self.assertEqual(222, last_pass)
268 self.assertEqual('test', try_job_type) 268 self.assertEqual('test', try_job_type)
269 self.assertEqual(expected_targeted_tests, targeted_tests) 269 self.assertEqual(expected_targeted_tests, targeted_tests)
270 270
271 def testNeedANewTryJobIfTestFailureSwarming(self): 271 def testNeedANewTryJobIfTestFailureSwarming(self):
272 master_name = 'm' 272 master_name = 'm'
273 builder_name = 'b' 273 builder_name = 'b'
274 build_number = 223 274 build_number = 223
275 failed_steps = { 275 failed_steps = {
276 'a': { 276 'a on platform': {
277 'current_failure': 223, 277 'current_failure': 223,
278 'first_failure': 222, 278 'first_failure': 222,
279 'last_pass': 221, 279 'last_pass': 221,
280 'tests': { 280 'tests': {
281 'a.t1': { 281 'a.t1': {
282 'current_failure': 223, 282 'current_failure': 223,
283 'first_failure': 223, 283 'first_failure': 223,
284 'last_pass': 221 284 'last_pass': 221
285 }, 285 },
286 'a.t2': { 286 'a.t2': {
(...skipping 26 matching lines...) Expand all
313 } 313 }
314 } 314 }
315 } 315 }
316 316
317 failure_result_map = {} 317 failure_result_map = {}
318 need_try_job, last_pass, try_job_type, targeted_tests = ( 318 need_try_job, last_pass, try_job_type, targeted_tests = (
319 try_job_util._NeedANewTryJob(master_name, builder_name, build_number, 319 try_job_util._NeedANewTryJob(master_name, builder_name, build_number,
320 failed_steps, failure_result_map)) 320 failed_steps, failure_result_map))
321 321
322 expected_failure_result_map = { 322 expected_failure_result_map = {
323 'a': { 323 'a on platform': {
324 'a.t1': 'm/b/223', 324 'a.t1': 'm/b/223',
325 'a.t2': 'm/b/222', 325 'a.t2': 'm/b/222',
326 'a.t3': 'm/b/223' 326 'a.t3': 'm/b/223'
327 }, 327 },
328 'b': { 328 'b': {
329 'b.t1': 'm/b/222', 329 'b.t1': 'm/b/222',
330 'b.t2': 'm/b/222' 330 'b.t2': 'm/b/222'
331 }, 331 },
332 } 332 }
333 333
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 'compile': { 387 'compile': {
388 'failed_targets': [ 388 'failed_targets': [
389 {'target': 'a.exe'}, 389 {'target': 'a.exe'},
390 {'source': 'b.cc', 390 {'source': 'b.cc',
391 'target': 'b.o'}] 391 'target': 'b.o'}]
392 } 392 }
393 } 393 }
394 394
395 self.assertEqual( 395 self.assertEqual(
396 try_job_util._GetFailedTargetsFromSignals(signals), ['a.exe']) 396 try_job_util._GetFailedTargetsFromSignals(signals), ['a.exe'])
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/waterfall/try_job_util.py » ('j') | appengine/findit/waterfall/try_job_util.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698