| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 del api.gclient.c.revisions[bot_config['component']['path']] | 113 del api.gclient.c.revisions[bot_config['component']['path']] |
| 114 # Update without changing got_revision. The first sync is the revision | 114 # Update without changing got_revision. The first sync is the revision |
| 115 # that is tested. The second is just for comparison. Setting got_revision | 115 # that is tested. The second is just for comparison. Setting got_revision |
| 116 # again confuses the waterfall's console view. | 116 # again confuses the waterfall's console view. |
| 117 api.bot_update.ensure_checkout(force=True, update_presentation=False) | 117 api.bot_update.ensure_checkout(force=True, update_presentation=False) |
| 118 | 118 |
| 119 api.chromium.runhooks() | 119 api.chromium.runhooks() |
| 120 api.chromium.compile() | 120 api.chromium.compile() |
| 121 | 121 |
| 122 api.test_utils.determine_new_failures( | 122 api.test_utils.determine_new_failures( |
| 123 api, [api.chromium.steps.BlinkTest(api)], component_pinned_fn) | 123 api, [api.chromium.steps.BlinkTest()], component_pinned_fn) |
| 124 | 124 |
| 125 | 125 |
| 126 def _sanitize_nonalpha(text): | 126 def _sanitize_nonalpha(text): |
| 127 return ''.join(c if c.isalnum() else '_' for c in text) | 127 return ''.join(c if c.isalnum() else '_' for c in text) |
| 128 | 128 |
| 129 | 129 |
| 130 def GenTests(api): | 130 def GenTests(api): |
| 131 canned_test = api.json.canned_test_output | 131 canned_test = api.json.canned_test_output |
| 132 with_patch = 'webkit_tests (with patch)' | 132 with_patch = 'webkit_tests (with patch)' |
| 133 without_patch = 'webkit_tests (without patch)' | 133 without_patch = 'webkit_tests (without patch)' |
| (...skipping 11 matching lines...) Expand all Loading... |
| 145 _sanitize_nonalpha(buildername)) | 145 _sanitize_nonalpha(buildername)) |
| 146 tests = [] | 146 tests = [] |
| 147 for (pass_first, suffix) in ((True, '_pass'), (False, '_fail')): | 147 for (pass_first, suffix) in ((True, '_pass'), (False, '_fail')): |
| 148 test = ( | 148 test = ( |
| 149 properties(mastername, buildername) + | 149 properties(mastername, buildername) + |
| 150 api.platform( | 150 api.platform( |
| 151 bot_config['testing']['platform'], | 151 bot_config['testing']['platform'], |
| 152 bot_config.get( | 152 bot_config.get( |
| 153 'chromium_config_kwargs', {}).get('TARGET_BITS', 64)) + | 153 'chromium_config_kwargs', {}).get('TARGET_BITS', 64)) + |
| 154 api.test(test_name + suffix) + | 154 api.test(test_name + suffix) + |
| 155 api.step_data(with_patch, canned_test(passing=pass_first)) | 155 api.override_step_data(with_patch, canned_test(passing=pass_first)) |
| 156 ) | 156 ) |
| 157 if not pass_first: | 157 if not pass_first: |
| 158 test += api.step_data( | 158 test += api.override_step_data( |
| 159 without_patch, canned_test(passing=False, minimal=True)) | 159 without_patch, canned_test(passing=False, minimal=True)) |
| 160 tests.append(test) | 160 tests.append(test) |
| 161 | 161 |
| 162 for test in tests: | 162 for test in tests: |
| 163 yield test | 163 yield test |
| 164 | 164 |
| 165 # This tests that if the first fails, but the second pass succeeds | 165 # This tests that if the first fails, but the second pass succeeds |
| 166 # that we fail the whole build. | 166 # that we fail the whole build. |
| 167 yield ( | 167 yield ( |
| 168 api.test('minimal_pass_continues') + | 168 api.test('minimal_pass_continues') + |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 # and compare the lists of failing tests). | 201 # and compare the lists of failing tests). |
| 202 yield ( | 202 yield ( |
| 203 api.test('too_many_failures_for_retcode') + | 203 api.test('too_many_failures_for_retcode') + |
| 204 properties('client.v8', 'V8-Blink Linux 64') + | 204 properties('client.v8', 'V8-Blink Linux 64') + |
| 205 api.override_step_data(with_patch, | 205 api.override_step_data(with_patch, |
| 206 canned_test(passing=False, | 206 canned_test(passing=False, |
| 207 num_additional_failures=125)) + | 207 num_additional_failures=125)) + |
| 208 api.override_step_data(without_patch, | 208 api.override_step_data(without_patch, |
| 209 canned_test(passing=True, minimal=True)) | 209 canned_test(passing=True, minimal=True)) |
| 210 ) | 210 ) |
| OLD | NEW |