| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 """ | 5 """ |
| 6 This recipe can be used by components like v8 to verify blink tests with a | 6 This recipe can be used by components like v8 to verify blink tests with a |
| 7 low false positive rate. Similar to a trybot, this recipe compares test | 7 low false positive rate. Similar to a trybot, this recipe compares test |
| 8 failures from a build with a current component revision with test failures | 8 failures from a build with a current component revision with test failures |
| 9 from a build with a pinned component revision. | 9 from a build with a pinned component revision. |
| 10 | 10 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 # Sync component to current component revision. | 126 # Sync component to current component revision. |
| 127 component_revision = api.properties.get('revision') or 'HEAD' | 127 component_revision = api.properties.get('revision') or 'HEAD' |
| 128 api.gclient.c.revisions[bot_config['component']['path']] = ( | 128 api.gclient.c.revisions[bot_config['component']['path']] = ( |
| 129 bot_config['component']['revision'] % component_revision) | 129 bot_config['component']['revision'] % component_revision) |
| 130 | 130 |
| 131 # Ensure we remember the chromium revision. | 131 # Ensure we remember the chromium revision. |
| 132 api.gclient.c.got_revision_mapping['src'] = 'got_cr_revision' | 132 api.gclient.c.got_revision_mapping['src'] = 'got_cr_revision' |
| 133 | 133 |
| 134 step_result = api.bot_update.ensure_checkout(force=True) | 134 step_result = api.bot_update.ensure_checkout(force=True) |
| 135 | 135 |
| 136 api.chromium.c.project_generator.tool = 'mb' |
| 136 api.chromium.runhooks() | 137 api.chromium.runhooks() |
| 137 api.chromium.compile() | 138 |
| 139 api.chromium_tests.run_mb_and_compile( |
| 140 ['blink_tests'], [], |
| 141 name_suffix=' (with patch)', |
| 142 ) |
| 138 | 143 |
| 139 api.chromium.runtest('webkit_unit_tests', xvfb=True) | 144 api.chromium.runtest('webkit_unit_tests', xvfb=True) |
| 140 | 145 |
| 141 def component_pinned_fn(_failing_steps): | 146 def component_pinned_fn(_failing_steps): |
| 142 bot_update_json = step_result.json.output | 147 bot_update_json = step_result.json.output |
| 143 api.gclient.c.revisions['src'] = str( | 148 api.gclient.c.revisions['src'] = str( |
| 144 bot_update_json['properties']['got_cr_revision']) | 149 bot_update_json['properties']['got_cr_revision']) |
| 145 # Reset component revision to the pinned revision from chromium's DEPS | 150 # Reset component revision to the pinned revision from chromium's DEPS |
| 146 # for comparison. | 151 # for comparison. |
| 147 del api.gclient.c.revisions[bot_config['component']['path']] | 152 del api.gclient.c.revisions[bot_config['component']['path']] |
| 148 # Update without changing got_revision. The first sync is the revision | 153 # Update without changing got_revision. The first sync is the revision |
| 149 # that is tested. The second is just for comparison. Setting got_revision | 154 # that is tested. The second is just for comparison. Setting got_revision |
| 150 # again confuses the waterfall's console view. | 155 # again confuses the waterfall's console view. |
| 151 api.bot_update.ensure_checkout(force=True, update_presentation=False) | 156 api.bot_update.ensure_checkout(force=True, update_presentation=False) |
| 152 | 157 |
| 153 api.chromium.runhooks() | 158 api.chromium_tests.run_mb_and_compile( |
| 154 api.chromium.compile() | 159 ['blink_tests'], [], |
| 160 name_suffix=' (without patch)', |
| 161 ) |
| 155 | 162 |
| 156 extra_args = list(bot_config.get('test_args', [])) | 163 extra_args = list(bot_config.get('test_args', [])) |
| 157 if bot_config.get('additional_expectations'): | 164 if bot_config.get('additional_expectations'): |
| 158 extra_args.extend([ | 165 extra_args.extend([ |
| 159 '--additional-expectations', | 166 '--additional-expectations', |
| 160 api.path['checkout'].join(*bot_config['additional_expectations']), | 167 api.path['checkout'].join(*bot_config['additional_expectations']), |
| 161 ]) | 168 ]) |
| 162 | 169 |
| 163 tests = [ | 170 tests = [ |
| 164 api.chromium_tests.steps.BlinkTest(extra_args=extra_args), | 171 api.chromium_tests.steps.BlinkTest(extra_args=extra_args), |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 # and compare the lists of failing tests). | 255 # and compare the lists of failing tests). |
| 249 yield ( | 256 yield ( |
| 250 api.test('too_many_failures_for_retcode') + | 257 api.test('too_many_failures_for_retcode') + |
| 251 properties('client.v8.fyi', 'V8-Blink Linux 64') + | 258 properties('client.v8.fyi', 'V8-Blink Linux 64') + |
| 252 api.override_step_data(with_patch, | 259 api.override_step_data(with_patch, |
| 253 canned_test(passing=False, | 260 canned_test(passing=False, |
| 254 num_additional_failures=125)) + | 261 num_additional_failures=125)) + |
| 255 api.override_step_data(without_patch, | 262 api.override_step_data(without_patch, |
| 256 canned_test(passing=True, minimal=True)) | 263 canned_test(passing=True, minimal=True)) |
| 257 ) | 264 ) |
| OLD | NEW |