Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 DEPS = [ | 5 DEPS = [ |
| 6 'bot_update', | 6 'bot_update', |
| 7 'chromium', | 7 'chromium', |
| 8 'chromium_tests', | |
| 8 'gclient', | 9 'gclient', |
| 10 'isolate', | |
| 9 'json', | 11 'json', |
| 10 'path', | 12 'path', |
| 11 'platform', | 13 'platform', |
| 12 'properties', | 14 'properties', |
| 13 'python', | 15 'python', |
| 14 'raw_io', | 16 'raw_io', |
| 15 'rietveld', | 17 'rietveld', |
| 16 'step', | 18 'step', |
| 19 'swarming', | |
| 17 'test_utils', | 20 'test_utils', |
| 18 ] | 21 ] |
| 19 | 22 |
| 20 | 23 |
| 21 BUILDERS = { | 24 BUILDERS = { |
| 22 'tryserver.blink': { | 25 'tryserver.blink': { |
| 23 'builders': { | 26 'builders': { |
| 24 'linux_blink_dbg': { | 27 'linux_blink_dbg': { |
| 25 'chromium_config_kwargs': { | 28 'chromium_config_kwargs': { |
| 26 'BUILD_CONFIG': 'Debug', | 29 'BUILD_CONFIG': 'Debug', |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 webkit_lint = api.path['build'].join('scripts', 'slave', 'chromium', | 267 webkit_lint = api.path['build'].join('scripts', 'slave', 'chromium', |
| 265 'lint_test_files_wrapper.py') | 268 'lint_test_files_wrapper.py') |
| 266 webkit_python_tests = api.path['build'].join('scripts', 'slave', 'chromium', | 269 webkit_python_tests = api.path['build'].join('scripts', 'slave', 'chromium', |
| 267 'test_webkitpy_wrapper.py') | 270 'test_webkitpy_wrapper.py') |
| 268 | 271 |
| 269 # Set patch_root used when applying the patch after checkout. Default None | 272 # Set patch_root used when applying the patch after checkout. Default None |
| 270 # makes bot_update determine the patch_root from tryserver root, e.g. 'src'. | 273 # makes bot_update determine the patch_root from tryserver root, e.g. 'src'. |
| 271 bot_update_step = api.bot_update.ensure_checkout( | 274 bot_update_step = api.bot_update.ensure_checkout( |
| 272 force=True, patch_root=bot_config.get('root_override')) | 275 force=True, patch_root=bot_config.get('root_override')) |
| 273 | 276 |
| 274 api.chromium.runhooks() | 277 if bot_config['compile_only']: |
| 275 api.chromium.compile() | 278 api.chromium.runhooks() |
| 279 api.chromium.compile() | |
|
Paweł Hajdan Jr.
2014/10/29 14:11:11
Early return here and de-indent everything below.
Sergiy Byelozyorov
2014/10/29 14:43:45
Done.
| |
| 280 else: | |
| 281 api.chromium_tests.configure_swarming('blink') | |
| 276 | 282 |
| 277 if not bot_config['compile_only']: | 283 # Swarming uses Isolate to transfer files to swarming bots. |
| 284 # set_isolate_environment modifies GYP_DEFINES to enable test isolation. | |
| 285 api.isolate.set_isolate_environment(api.chromium.c) | |
| 286 | |
| 287 # Ensure swarming_client is compatible with what recipes expect. | |
| 288 api.swarming.check_client_version() | |
| 289 | |
| 290 api.chromium.runhooks() | |
| 291 | |
| 292 api.isolate.clean_isolated_files(api.chromium.output_dir) | |
| 293 api.chromium.compile() | |
| 294 api.isolate.find_isolated_tests(api.chromium.output_dir) | |
| 295 | |
| 278 api.python('webkit_lint', webkit_lint, [ | 296 api.python('webkit_lint', webkit_lint, [ |
| 279 '--build-dir', api.path['checkout'].join('out'), | 297 '--build-dir', api.path['checkout'].join('out'), |
| 280 '--target', api.chromium.c.BUILD_CONFIG | 298 '--target', api.chromium.c.BUILD_CONFIG |
| 281 ]) | 299 ]) |
| 282 api.python('webkit_python_tests', webkit_python_tests, [ | 300 api.python('webkit_python_tests', webkit_python_tests, [ |
| 283 '--build-dir', api.path['checkout'].join('out'), | 301 '--build-dir', api.path['checkout'].join('out'), |
| 284 '--target', api.chromium.c.BUILD_CONFIG, | 302 '--target', api.chromium.c.BUILD_CONFIG, |
| 285 ]) | 303 ]) |
| 286 | 304 |
| 287 # TODO(martiniss) this is pretty goofy | 305 # TODO(martiniss) this is pretty goofy |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 310 except api.step.StepFailure as f: | 328 except api.step.StepFailure as f: |
| 311 failed = True | 329 failed = True |
| 312 exception = f | 330 exception = f |
| 313 | 331 |
| 314 if failed: | 332 if failed: |
| 315 api.python.inline( | 333 api.python.inline( |
| 316 'Aborting due to failed build state', | 334 'Aborting due to failed build state', |
| 317 "import sys; sys.exit(1)") | 335 "import sys; sys.exit(1)") |
| 318 raise exception | 336 raise exception |
| 319 | 337 |
| 320 if not bot_config['compile_only']: | |
| 321 def deapply_patch_fn(_failing_steps): | 338 def deapply_patch_fn(_failing_steps): |
| 322 bot_update_json = bot_update_step.json.output | 339 bot_update_json = bot_update_step.json.output |
| 323 api.gclient.c.revisions['src'] = str( | 340 api.gclient.c.revisions['src'] = str( |
| 324 bot_update_json['properties']['got_revision']) | 341 bot_update_json['properties']['got_revision']) |
| 325 api.gclient.c.revisions['src/third_party/WebKit'] = str( | 342 api.gclient.c.revisions['src/third_party/WebKit'] = str( |
| 326 bot_update_json['properties']['got_webkit_revision']) | 343 bot_update_json['properties']['got_webkit_revision']) |
| 327 | 344 |
| 328 api.bot_update.ensure_checkout(patch=False, force=True) | 345 api.bot_update.ensure_checkout(patch=False, force=True) |
| 329 api.chromium.runhooks() | 346 api.chromium.runhooks() |
| 347 api.isolate.clean_isolated_files(api.chromium.output_dir) | |
| 330 api.chromium.compile() | 348 api.chromium.compile() |
| 349 api.isolate.find_isolated_tests(api.chromium.output_dir) | |
| 331 | 350 |
| 332 api.test_utils.determine_new_failures( | 351 api.test_utils.determine_new_failures( |
| 333 api, [api.chromium.steps.BlinkTest(api)], deapply_patch_fn) | 352 api, [api.chromium.steps.BlinkTest(api)], deapply_patch_fn) |
| 334 | 353 |
| 335 | 354 |
| 336 def _sanitize_nonalpha(text): | 355 def _sanitize_nonalpha(text): |
| 337 return ''.join(c if c.isalnum() else '_' for c in text) | 356 return ''.join(c if c.isalnum() else '_' for c in text) |
| 338 | 357 |
| 339 | 358 |
| 340 def GenTests(api): | 359 def GenTests(api): |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 361 api.test(test_name + ('_pass' if pass_first else '_fail')) + | 380 api.test(test_name + ('_pass' if pass_first else '_fail')) + |
| 362 api.step_data(with_patch, canned_test(passing=pass_first)) | 381 api.step_data(with_patch, canned_test(passing=pass_first)) |
| 363 ) | 382 ) |
| 364 if not pass_first: | 383 if not pass_first: |
| 365 test += api.step_data( | 384 test += api.step_data( |
| 366 without_patch, canned_test(passing=False, minimal=True)) | 385 without_patch, canned_test(passing=False, minimal=True)) |
| 367 tests.append(test) | 386 tests.append(test) |
| 368 | 387 |
| 369 for test in tests: | 388 for test in tests: |
| 370 test += ( | 389 test += ( |
| 371 properties(mastername, buildername) + | 390 properties(mastername, buildername, |
| 391 blamelist_real=['someone@chromium.org']) + | |
| 372 api.platform(bot_config['testing']['platform'], | 392 api.platform(bot_config['testing']['platform'], |
| 373 bot_config.get( | 393 bot_config.get( |
| 374 'chromium_config_kwargs', {}).get('TARGET_BITS', 64)) | 394 'chromium_config_kwargs', {}).get('TARGET_BITS', 64)) |
| 375 ) | 395 ) |
| 376 | 396 |
| 377 yield test | 397 yield test |
| 378 | 398 |
| 379 # This tests that if the first fails, but the second pass succeeds | 399 # This tests that if the first fails, but the second pass succeeds |
| 380 # that we fail the whole build. | 400 # that we fail the whole build. |
| 381 yield ( | 401 yield ( |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 431 # and compare the lists of failing tests). | 451 # and compare the lists of failing tests). |
| 432 yield ( | 452 yield ( |
| 433 api.test('too_many_failures_for_retcode') + | 453 api.test('too_many_failures_for_retcode') + |
| 434 properties('tryserver.blink', 'linux_blink_rel') + | 454 properties('tryserver.blink', 'linux_blink_rel') + |
| 435 api.override_step_data(with_patch, | 455 api.override_step_data(with_patch, |
| 436 canned_test(passing=False, | 456 canned_test(passing=False, |
| 437 num_additional_failures=125)) + | 457 num_additional_failures=125)) + |
| 438 api.override_step_data(without_patch, | 458 api.override_step_data(without_patch, |
| 439 canned_test(passing=True, minimal=True)) | 459 canned_test(passing=True, minimal=True)) |
| 440 ) | 460 ) |
| 461 | |
| 462 yield ( | |
| 463 api.test('non_cq_tryjob') + | |
| 464 properties('tryserver.blink', 'win_blink_rel', | |
| 465 requester='someone@chromium.org') + | |
| 466 api.step_data(with_patch, canned_test(passing=True)) | |
| 467 ) | |
| OLD | NEW |