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

Side by Side Diff: scripts/slave/recipes/findit/chromium/test.py

Issue 1720873002: swarming: always append task's OS dimension to step name (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 10 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 | Annotate | Revision Log
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 import json 5 import json
6 6
7 from recipe_engine.config import Dict 7 from recipe_engine.config import Dict
8 from recipe_engine.config import Single 8 from recipe_engine.config import Single
9 from recipe_engine.recipe_api import Property 9 from recipe_engine.recipe_api import Property
10 10
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 'buildername': '%s_chromium_variable' % platform_name, 238 'buildername': '%s_chromium_variable' % platform_name,
239 'slavename': 'build1-a1', 239 'slavename': 'build1-a1',
240 'buildnumber': 1, 240 'buildnumber': 1,
241 'target_mastername': 'chromium.%s' % platform_name, 241 'target_mastername': 'chromium.%s' % platform_name,
242 'target_testername': tester_name, 242 'target_testername': tester_name,
243 'good_revision': 'r0', 243 'good_revision': 'r0',
244 'bad_revision': 'r1', 244 'bad_revision': 'r1',
245 'tests': tests, 245 'tests': tests,
246 'use_analyze': use_analyze, 246 'use_analyze': use_analyze,
247 } 247 }
248 return api.properties(**properties) 248 return api.properties(**properties) + api.platform.name(platform_name)
249 249
250 def simulated_gtest_output(failed_test_names=(), passed_test_names=()): 250 def simulated_gtest_output(failed_test_names=(), passed_test_names=()):
251 cur_iteration_data = {} 251 cur_iteration_data = {}
252 for test_name in failed_test_names: 252 for test_name in failed_test_names:
253 cur_iteration_data[test_name] = [{ 253 cur_iteration_data[test_name] = [{
254 'elapsed_time_ms': 0, 254 'elapsed_time_ms': 0,
255 'output_snippet': '', 255 'output_snippet': '',
256 'status': 'FAILURE', 256 'status': 'FAILURE',
257 }] 257 }]
258 for test_name in passed_test_names: 258 for test_name in passed_test_names:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 })) + 305 })) +
306 api.override_step_data( 306 api.override_step_data(
307 'test r1.analyze', 307 'test r1.analyze',
308 api.json.output({ 308 api.json.output({
309 'status': 'Found dependency', 309 'status': 'Found dependency',
310 'compile_targets': ['affected_tests', 'affected_tests_run'], 310 'compile_targets': ['affected_tests', 'affected_tests_run'],
311 'test_targets': ['affected_tests', 'affected_tests_run'], 311 'test_targets': ['affected_tests', 'affected_tests_run'],
312 }) 312 })
313 ) + 313 ) +
314 api.override_step_data( 314 api.override_step_data(
315 'test r1.affected_tests (r1)', 315 'test r1.affected_tests (r1) on Windows-7-SP1',
316 simulated_gtest_output(passed_test_names=['Test.One']) 316 simulated_gtest_output(passed_test_names=['Test.One'])
317 ) 317 )
318 ) 318 )
319 319
320 yield ( 320 yield (
321 api.test('test_without_targets_not_skipped') + 321 api.test('test_without_targets_not_skipped') +
322 props({'unaffected_tests': ['Test.One'], 'checkperms': []}, 322 props({'unaffected_tests': ['Test.One'], 'checkperms': []},
323 'win', 'Win7 Tests (1)', use_analyze=True) + 323 'win', 'Win7 Tests (1)', use_analyze=True) +
324 api.override_step_data('test r1.read test spec', api.json.output({ 324 api.override_step_data('test r1.read test spec', api.json.output({
325 'Win7 Tests (1)': { 325 'Win7 Tests (1)': {
(...skipping 29 matching lines...) Expand all
355 'Win7 Tests (1)': { 355 'Win7 Tests (1)': {
356 'gtest_tests': [ 356 'gtest_tests': [
357 { 357 {
358 'test': 'gl_tests', 358 'test': 'gl_tests',
359 'swarming': {'can_use_on_swarming_builders': True}, 359 'swarming': {'can_use_on_swarming_builders': True},
360 }, 360 },
361 ], 361 ],
362 }, 362 },
363 })) + 363 })) +
364 api.override_step_data( 364 api.override_step_data(
365 'test r1.gl_tests (r1)', 365 'test r1.gl_tests (r1) on Windows-7-SP1',
366 simulated_gtest_output( 366 simulated_gtest_output(
367 failed_test_names=['Test.One', 'Test.Two', 'Test.Three']) 367 failed_test_names=['Test.One', 'Test.Two', 'Test.Three'])
368 ) 368 )
369 ) 369 )
370 370
371 yield ( 371 yield (
372 api.test('all_test_passed') + 372 api.test('all_test_passed') +
373 props({'gl_tests': ['Test.One', 'Test.Two', 'Test.Three']}, 373 props({'gl_tests': ['Test.One', 'Test.Two', 'Test.Three']},
374 'win', 'Win7 Tests (1)') + 374 'win', 'Win7 Tests (1)') +
375 api.override_step_data('test r1.read test spec', api.json.output({ 375 api.override_step_data('test r1.read test spec', api.json.output({
376 'Win7 Tests (1)': { 376 'Win7 Tests (1)': {
377 'gtest_tests': [ 377 'gtest_tests': [
378 { 378 {
379 'test': 'gl_tests', 379 'test': 'gl_tests',
380 'swarming': {'can_use_on_swarming_builders': True}, 380 'swarming': {'can_use_on_swarming_builders': True},
381 }, 381 },
382 ], 382 ],
383 }, 383 },
384 })) + 384 })) +
385 api.override_step_data( 385 api.override_step_data(
386 'test r1.gl_tests (r1)', 386 'test r1.gl_tests (r1) on Windows-7-SP1',
387 simulated_gtest_output( 387 simulated_gtest_output(
388 passed_test_names=['Test.One', 'Test.Two', 'Test.Three']) 388 passed_test_names=['Test.One', 'Test.Two', 'Test.Three'])
389 ) 389 )
390 ) 390 )
391 391
392 yield ( 392 yield (
393 api.test('only_one_test_passed') + 393 api.test('only_one_test_passed') +
394 props({'gl_tests': ['Test.One', 'Test.Two', 'Test.Three']}, 394 props({'gl_tests': ['Test.One', 'Test.Two', 'Test.Three']},
395 'win', 'Win7 Tests (1)') + 395 'win', 'Win7 Tests (1)') +
396 api.override_step_data('test r1.read test spec', api.json.output({ 396 api.override_step_data('test r1.read test spec', api.json.output({
397 'Win7 Tests (1)': { 397 'Win7 Tests (1)': {
398 'gtest_tests': [ 398 'gtest_tests': [
399 { 399 {
400 'test': 'gl_tests', 400 'test': 'gl_tests',
401 'swarming': {'can_use_on_swarming_builders': True}, 401 'swarming': {'can_use_on_swarming_builders': True},
402 }, 402 },
403 ], 403 ],
404 }, 404 },
405 })) + 405 })) +
406 api.override_step_data( 406 api.override_step_data(
407 'test r1.gl_tests (r1)', 407 'test r1.gl_tests (r1) on Windows-7-SP1',
408 simulated_gtest_output( 408 simulated_gtest_output(
409 failed_test_names=['Test.One', 'Test.Two'], 409 failed_test_names=['Test.One', 'Test.Two'],
410 passed_test_names=['Test.Three']) 410 passed_test_names=['Test.Three'])
411 ) 411 )
412 ) 412 )
413 413
414 yield ( 414 yield (
415 api.test('compile_skipped') + 415 api.test('compile_skipped') +
416 props({'checkperms': []}, 'win', 'Win7 Tests (1)') + 416 props({'checkperms': []}, 'win', 'Win7 Tests (1)') +
417 api.override_step_data('test r1.read test spec', api.json.output({ 417 api.override_step_data('test r1.read test spec', api.json.output({
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 'swarming': {'can_use_on_swarming_builders': True}, 459 'swarming': {'can_use_on_swarming_builders': True},
460 }, 460 },
461 ], 461 ],
462 }, 462 },
463 })) + 463 })) +
464 api.override_step_data( 464 api.override_step_data(
465 'test r1.gl_tests (r1) on Mac-10.9', 465 'test r1.gl_tests (r1) on Mac-10.9',
466 simulated_gtest_output(passed_test_names=['Test.One']) 466 simulated_gtest_output(passed_test_names=['Test.One'])
467 ) 467 )
468 ) 468 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698