Changeset 74408 in webkit
- Timestamp:
- Dec 21, 2010 4:55:45 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r74403 r74408 1 2010-12-21 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 commit-queue will report constant failures as flaky if other tests flake 6 https://bugs.webkit.org/show_bug.cgi?id=51272 7 8 This patch just removes functionality and adds testing. 9 Previously we attempted to report flaky tests when we had 10 two different tests fail in a row. However, since we stop 11 running the tests at the first failure, our code was wrong in 12 trying to determine flakiness from the incomplete runs. 13 14 Originally I posted an alternate patch: 15 https://bug-51272-attachments.webkit.org/attachment.cgi?id=77078 16 which fixed our flaky logic in this case, however it was decided 17 that that patch would be too difficult to maintain, so now 18 I'm just removing the broken logic. 19 20 This will dramatically cut-down on our flaky-test false positives 21 at the (small) cost of the queues being unable to report 22 any flakiness if the tree is very flaky. (With at least one test 23 flaking on every run, we'll never report failures anymore.) I think 24 this is a tradeoff worth making. 25 26 * Scripts/webkitpy/tool/bot/commitqueuetask.py: 27 * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py: 28 1 29 2010-12-20 Eric Seidel <eric@webkit.org> 2 30 -
trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
r74403 r74408 185 185 second_failing_tests = self._failing_tests_from_last_run() 186 186 if first_failing_tests != second_failing_tests: 187 self._report_flaky_tests(first_failing_tests + second_failing_tests) 187 # We could report flaky tests here, but since run-webkit-tests 188 # is run with --exit-after-N-failures=1, we would need to 189 # be careful not to report constant failures as flaky due to earlier 190 # flaky test making them not fail (no results) in one of the runs. 191 # See https://bugs.webkit.org/show_bug.cgi?id=51272 188 192 return False 189 193 … … 211 215 if not self._validate(): 212 216 return False 217 # FIXME: We should understand why the land failure occured and retry if possible. 213 218 if not self._land(): 214 219 raise self._script_error -
trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
r74403 r74408 68 68 69 69 class CommitQueueTaskTest(unittest.TestCase): 70 def _run_through_task(self, commit_queue, expected_stderr, expected_exception=None ):70 def _run_through_task(self, commit_queue, expected_stderr, expected_exception=None, expect_retry=False): 71 71 tool = MockTool(log_executive=True) 72 72 patch = tool.bugs.fetch_attachment(197) 73 73 task = CommitQueueTask(commit_queue, patch) 74 OutputCapture().assert_outputs(self, task.run, expected_stderr=expected_stderr, expected_exception=expected_exception) 74 success = OutputCapture().assert_outputs(self, task.run, expected_stderr=expected_stderr, expected_exception=expected_exception) 75 if not expected_exception: 76 self.assertEqual(success, not expect_retry) 75 77 76 78 def test_success_case(self): … … 98 100 command_failed: failure_message='Unable to clean working directory' script_error='MOCK clean failure' patch='197' 99 101 """ 100 self._run_through_task(commit_queue, expected_stderr )102 self._run_through_task(commit_queue, expected_stderr, expect_retry=True) 101 103 102 104 def test_update_failure(self): … … 110 112 command_failed: failure_message='Unable to update working directory' script_error='MOCK update failure' patch='197' 111 113 """ 112 self._run_through_task(commit_queue, expected_stderr )114 self._run_through_task(commit_queue, expected_stderr, expect_retry=True) 113 115 114 116 def test_apply_failure(self): … … 166 168 command_failed: failure_message='Unable to build without patch' script_error='MOCK clean build failure' patch='197' 167 169 """ 168 self._run_through_task(commit_queue, expected_stderr )170 self._run_through_task(commit_queue, expected_stderr, expect_retry=True) 169 171 170 172 def test_flaky_test_failure(self): … … 194 196 self._run_through_task(commit_queue, expected_stderr) 195 197 198 _double_flaky_test_counter = 0 199 200 def test_double_flaky_test_failure(self): 201 commit_queue = MockCommitQueue([ 202 None, 203 None, 204 None, 205 None, 206 ScriptError("MOCK test failure"), 207 ScriptError("MOCK test failure again"), 208 ]) 209 # The (subtle) point of this test is that report_flaky_tests does not appear 210 # in the expected_stderr for this run. 211 # Note also that there is no attempt to run the tests w/o the patch. 212 expected_stderr = """run_webkit_patch: ['clean'] 213 command_passed: success_message='Cleaned working directory' patch='197' 214 run_webkit_patch: ['update'] 215 command_passed: success_message='Updated working directory' patch='197' 216 run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197] 217 command_passed: success_message='Applied patch' patch='197' 218 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both'] 219 command_passed: success_message='Built patch' patch='197' 220 run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive'] 221 command_failed: failure_message='Patch does not pass tests' script_error='MOCK test failure' patch='197' 222 run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive'] 223 command_failed: failure_message='Patch does not pass tests' script_error='MOCK test failure again' patch='197' 224 """ 225 tool = MockTool(log_executive=True) 226 patch = tool.bugs.fetch_attachment(197) 227 task = CommitQueueTask(commit_queue, patch) 228 self._double_flaky_test_counter = 0 229 230 def mock_failing_tests_from_last_run(): 231 CommitQueueTaskTest._double_flaky_test_counter += 1 232 if CommitQueueTaskTest._double_flaky_test_counter % 2: 233 return ['foo.html'] 234 return ['bar.html'] 235 236 task._failing_tests_from_last_run = mock_failing_tests_from_last_run 237 success = OutputCapture().assert_outputs(self, task.run, expected_stderr=expected_stderr) 238 self.assertEqual(success, False) 239 196 240 def test_test_failure(self): 197 241 commit_queue = MockCommitQueue([ … … 245 289 command_failed: failure_message='Unable to pass tests without patch (tree is red?)' script_error='MOCK clean test failure' patch='197' 246 290 """ 247 self._run_through_task(commit_queue, expected_stderr )291 self._run_through_task(commit_queue, expected_stderr, expect_retry=True) 248 292 249 293 def test_land_failure(self): … … 269 313 command_failed: failure_message='Unable to land patch' script_error='MOCK land failure' patch='197' 270 314 """ 315 # FIXME: This should really be expect_retry=True for a better user experiance. 271 316 self._run_through_task(commit_queue, expected_stderr, ScriptError)
Note: See TracChangeset
for help on using the changeset viewer.