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 'gclient', | 8 'gclient', |
| 9 'json', | 9 'json', |
| 10 'path', | 10 'path', |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 'testing': { | 247 'testing': { |
| 248 'platform': 'linux', | 248 'platform': 'linux', |
| 249 }, | 249 }, |
| 250 }, | 250 }, |
| 251 }, | 251 }, |
| 252 }, | 252 }, |
| 253 } | 253 } |
| 254 | 254 |
| 255 | 255 |
| 256 def GenSteps(api): | 256 def GenSteps(api): |
| 257 class BlinkTest(api.test_utils.Test): | 257 class BlinkTest(api.chromium.steps.Test): |
|
agable
2014/06/28 00:05:13
Can we move this into steps.py with everything els
Paweł Hajdan Jr.
2014/06/28 00:19:01
Done.
| |
| 258 name = 'webkit_tests' | 258 name = 'webkit_tests' |
| 259 | 259 |
| 260 def __init__(self): | 260 def __init__(self): |
| 261 self.results_dir = api.path['slave_build'].join('layout-test-results') | 261 self.results_dir = api.path['slave_build'].join('layout-test-results') |
| 262 self.layout_test_wrapper = api.path['build'].join( | 262 self.layout_test_wrapper = api.path['build'].join( |
| 263 'scripts', 'slave', 'chromium', 'layout_test_wrapper.py') | 263 'scripts', 'slave', 'chromium', 'layout_test_wrapper.py') |
| 264 | 264 |
| 265 def run(self, suffix): | 265 def run(self, api, suffix): |
| 266 args = ['--target', api.chromium.c.BUILD_CONFIG, | 266 args = ['--target', api.chromium.c.BUILD_CONFIG, |
| 267 '-o', self.results_dir, | 267 '-o', self.results_dir, |
| 268 '--build-dir', api.chromium.c.build_dir, | 268 '--build-dir', api.chromium.c.build_dir, |
| 269 '--json-test-results', api.json.test_results(add_json_log=False)] | 269 '--json-test-results', api.json.test_results(add_json_log=False)] |
| 270 if suffix == 'without patch': | 270 if suffix == 'without patch': |
| 271 test_list = "\n".join(self.failures('with patch')) | 271 test_list = "\n".join(self.failures(api, 'with patch')) |
| 272 args.extend(['--test-list', api.raw_io.input(test_list), | 272 args.extend(['--test-list', api.raw_io.input(test_list), |
| 273 '--skipped', 'always']) | 273 '--skipped', 'always']) |
| 274 | 274 |
| 275 if 'oilpan' in api.properties['buildername']: | 275 if 'oilpan' in api.properties['buildername']: |
| 276 args.extend(['--additional-expectations', | 276 args.extend(['--additional-expectations', |
| 277 api.path['checkout'].join('third_party', 'WebKit', | 277 api.path['checkout'].join('third_party', 'WebKit', |
| 278 'LayoutTests', | 278 'LayoutTests', |
| 279 'OilpanExpectations')]) | 279 'OilpanExpectations')]) |
| 280 | 280 |
| 281 def followup_fn(step_result): | 281 def followup_fn(step_result): |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 [ | 321 [ |
| 322 '--results-dir', self.results_dir, | 322 '--results-dir', self.results_dir, |
| 323 '--build-dir', api.chromium.c.build_dir, | 323 '--build-dir', api.chromium.c.build_dir, |
| 324 '--build-number', buildnumber, | 324 '--build-number', buildnumber, |
| 325 '--builder-name', buildername, | 325 '--builder-name', buildername, |
| 326 '--gs-bucket', 'gs://chromium-layout-test-archives', | 326 '--gs-bucket', 'gs://chromium-layout-test-archives', |
| 327 ] + api.json.property_args(), | 327 ] + api.json.property_args(), |
| 328 followup_fn=archive_webkit_tests_results_followup | 328 followup_fn=archive_webkit_tests_results_followup |
| 329 ) | 329 ) |
| 330 | 330 |
| 331 def has_valid_results(self, suffix): | 331 def has_valid_results(self, api, suffix): |
| 332 step = api.step_history[self._step_name(suffix)] | 332 step = api.step_history[self._step_name(suffix)] |
| 333 # TODO(dpranke): crbug.com/357866 - note that all comparing against | 333 # TODO(dpranke): crbug.com/357866 - note that all comparing against |
| 334 # MAX_FAILURES_EXIT_STATUS tells us is that we did not exit early | 334 # MAX_FAILURES_EXIT_STATUS tells us is that we did not exit early |
| 335 # or abnormally; it does not tell us how many failures there actually | 335 # or abnormally; it does not tell us how many failures there actually |
| 336 # were, which might be much higher (up to 5000 diffs, where we | 336 # were, which might be much higher (up to 5000 diffs, where we |
| 337 # would bail out early with --exit-after-n-failures) or lower | 337 # would bail out early with --exit-after-n-failures) or lower |
| 338 # if we bailed out after 100 crashes w/ -exit-after-n-crashes, in | 338 # if we bailed out after 100 crashes w/ -exit-after-n-crashes, in |
| 339 # which case the retcode is actually 130 | 339 # which case the retcode is actually 130 |
| 340 return (step.json.test_results.valid and | 340 return (step.json.test_results.valid and |
| 341 step.retcode <= step.json.test_results.MAX_FAILURES_EXIT_STATUS) | 341 step.retcode <= step.json.test_results.MAX_FAILURES_EXIT_STATUS) |
| 342 | 342 |
| 343 def failures(self, suffix): | 343 def failures(self, api, suffix): |
| 344 sn = self._step_name(suffix) | 344 sn = self._step_name(suffix) |
| 345 return api.step_history[sn].json.test_results.unexpected_failures | 345 return api.step_history[sn].json.test_results.unexpected_failures |
| 346 | 346 |
| 347 mastername = api.properties.get('mastername') | 347 mastername = api.properties.get('mastername') |
| 348 buildername = api.properties.get('buildername') | 348 buildername = api.properties.get('buildername') |
| 349 master_dict = BUILDERS.get(mastername, {}) | 349 master_dict = BUILDERS.get(mastername, {}) |
| 350 bot_config = master_dict.get('builders', {}).get(buildername) | 350 bot_config = master_dict.get('builders', {}).get(buildername) |
| 351 | 351 |
| 352 api.chromium.set_config('blink', | 352 api.chromium.set_config('blink', |
| 353 **bot_config.get('chromium_config_kwargs', {})) | 353 **bot_config.get('chromium_config_kwargs', {})) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 | 392 |
| 393 if not bot_config['compile_only']: | 393 if not bot_config['compile_only']: |
| 394 def deapply_patch_fn(_failing_steps): | 394 def deapply_patch_fn(_failing_steps): |
| 395 yield api.bot_update.ensure_checkout(patch=False, always_run=True) | 395 yield api.bot_update.ensure_checkout(patch=False, always_run=True) |
| 396 | 396 |
| 397 yield ( | 397 yield ( |
| 398 api.chromium.runhooks(always_run=True), | 398 api.chromium.runhooks(always_run=True), |
| 399 api.chromium.compile(always_run=True), | 399 api.chromium.compile(always_run=True), |
| 400 ) | 400 ) |
| 401 | 401 |
| 402 yield api.test_utils.determine_new_failures([BlinkTest()], deapply_patch_fn) | 402 yield api.test_utils.determine_new_failures( |
| 403 api, [BlinkTest()], deapply_patch_fn) | |
| 403 | 404 |
| 404 | 405 |
| 405 def _sanitize_nonalpha(text): | 406 def _sanitize_nonalpha(text): |
| 406 return ''.join(c if c.isalnum() else '_' for c in text) | 407 return ''.join(c if c.isalnum() else '_' for c in text) |
| 407 | 408 |
| 408 | 409 |
| 409 def GenTests(api): | 410 def GenTests(api): |
| 410 canned_test = api.json.canned_test_output | 411 canned_test = api.json.canned_test_output |
| 411 with_patch = 'webkit_tests (with patch)' | 412 with_patch = 'webkit_tests (with patch)' |
| 412 without_patch = 'webkit_tests (without patch)' | 413 without_patch = 'webkit_tests (without patch)' |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 507 # and compare the lists of failing tests). | 508 # and compare the lists of failing tests). |
| 508 yield ( | 509 yield ( |
| 509 api.test('too_many_failures_for_retcode') + | 510 api.test('too_many_failures_for_retcode') + |
| 510 properties('tryserver.blink', 'linux_blink_rel') + | 511 properties('tryserver.blink', 'linux_blink_rel') + |
| 511 api.override_step_data(with_patch, | 512 api.override_step_data(with_patch, |
| 512 canned_test(passing=False, | 513 canned_test(passing=False, |
| 513 num_additional_failures=125)) + | 514 num_additional_failures=125)) + |
| 514 api.override_step_data(without_patch, | 515 api.override_step_data(without_patch, |
| 515 canned_test(passing=True, minimal=True)) | 516 canned_test(passing=True, minimal=True)) |
| 516 ) | 517 ) |
| OLD | NEW |