| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 context = {} | 135 context = {} |
| 136 checkout_dir = api.chromium_checkout.get_checkout_dir(bot_config) | 136 checkout_dir = api.chromium_checkout.get_checkout_dir(bot_config) |
| 137 if checkout_dir: | 137 if checkout_dir: |
| 138 context['cwd'] = checkout_dir | 138 context['cwd'] = checkout_dir |
| 139 | 139 |
| 140 # Run all steps in the checkout dir (consistent with chromium_tests). | 140 # Run all steps in the checkout dir (consistent with chromium_tests). |
| 141 with api.step.context(context): | 141 with api.step.context(context): |
| 142 # TODO(phajdan.jr): remove redundant **context below once we fix things | 142 # TODO(phajdan.jr): remove redundant **context below once we fix things |
| 143 # to behave the same without it. | 143 # to behave the same without it. |
| 144 step_result = api.bot_update.ensure_checkout(force=True, **context) | 144 step_result = api.bot_update.ensure_checkout(**context) |
| 145 | 145 |
| 146 api.chromium.ensure_goma() | 146 api.chromium.ensure_goma() |
| 147 | 147 |
| 148 api.chromium.c.project_generator.tool = 'mb' | 148 api.chromium.c.project_generator.tool = 'mb' |
| 149 api.chromium.runhooks() | 149 api.chromium.runhooks() |
| 150 | 150 |
| 151 api.chromium_tests.run_mb_and_compile( | 151 api.chromium_tests.run_mb_and_compile( |
| 152 ['blink_tests'], [], | 152 ['blink_tests'], [], |
| 153 name_suffix=' (with patch)', | 153 name_suffix=' (with patch)', |
| 154 ) | 154 ) |
| 155 | 155 |
| 156 api.chromium.runtest('webkit_unit_tests', xvfb=True) | 156 api.chromium.runtest('webkit_unit_tests', xvfb=True) |
| 157 | 157 |
| 158 def component_pinned_fn(_failing_steps): | 158 def component_pinned_fn(_failing_steps): |
| 159 bot_update_json = step_result.json.output | 159 bot_update_json = step_result.json.output |
| 160 api.gclient.c.revisions['src'] = str( | 160 api.gclient.c.revisions['src'] = str( |
| 161 bot_update_json['properties']['got_cr_revision']) | 161 bot_update_json['properties']['got_cr_revision']) |
| 162 # Reset component revision to the pinned revision from chromium's DEPS | 162 # Reset component revision to the pinned revision from chromium's DEPS |
| 163 # for comparison. | 163 # for comparison. |
| 164 del api.gclient.c.revisions[bot_config['component']['path']] | 164 del api.gclient.c.revisions[bot_config['component']['path']] |
| 165 # Update without changing got_revision. The first sync is the revision | 165 # Update without changing got_revision. The first sync is the revision |
| 166 # that is tested. The second is just for comparison. Setting got_revision | 166 # that is tested. The second is just for comparison. Setting got_revision |
| 167 # again confuses the waterfall's console view. | 167 # again confuses the waterfall's console view. |
| 168 api.bot_update.ensure_checkout(force=True, update_presentation=False) | 168 api.bot_update.ensure_checkout(update_presentation=False) |
| 169 | 169 |
| 170 api.chromium_tests.run_mb_and_compile( | 170 api.chromium_tests.run_mb_and_compile( |
| 171 ['blink_tests'], [], | 171 ['blink_tests'], [], |
| 172 name_suffix=' (without patch)', | 172 name_suffix=' (without patch)', |
| 173 ) | 173 ) |
| 174 | 174 |
| 175 extra_args = list(bot_config.get('test_args', [])) | 175 extra_args = list(bot_config.get('test_args', [])) |
| 176 if bot_config.get('additional_expectations'): | 176 if bot_config.get('additional_expectations'): |
| 177 extra_args.extend([ | 177 extra_args.extend([ |
| 178 '--additional-expectations', | 178 '--additional-expectations', |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 # and compare the lists of failing tests). | 268 # and compare the lists of failing tests). |
| 269 yield ( | 269 yield ( |
| 270 api.test('too_many_failures_for_retcode') + | 270 api.test('too_many_failures_for_retcode') + |
| 271 properties('client.v8.fyi', 'V8-Blink Linux 64') + | 271 properties('client.v8.fyi', 'V8-Blink Linux 64') + |
| 272 api.override_step_data(with_patch, | 272 api.override_step_data(with_patch, |
| 273 canned_test(passing=False, | 273 canned_test(passing=False, |
| 274 num_additional_failures=125)) + | 274 num_additional_failures=125)) + |
| 275 api.override_step_data(without_patch, | 275 api.override_step_data(without_patch, |
| 276 canned_test(passing=True, minimal=True)) | 276 canned_test(passing=True, minimal=True)) |
| 277 ) | 277 ) |
| OLD | NEW |