Changeset 87601 in webkit
- Timestamp:
- May 27, 2011 9:48:28 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r87597 r87601 1 2011-05-27 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 When checking whether the tree is red, the EWS posts a link to the wrong log 6 https://bugs.webkit.org/show_bug.cgi?id=61072 7 8 We need to cache the original script error because that contains the 9 failure log we want to upload. If we don't cache that script error, 10 self._script_error will get overwritten when we sanity check the clean 11 tree (and it also has test failures). 12 13 * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py: 14 - This testing approach is slightly goofy. We'd like to use 15 assertRaisesRegexp, but that's not available until Python 2.7. 16 * Scripts/webkitpy/tool/bot/patchanalysistask.py: 17 1 18 2011-05-27 Jochen Eisinger <jochen@chromium.org> 2 19 -
trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
r85509 r87601 107 107 108 108 109 # We use GoldenScriptError to make sure that the code under test throws the 110 # correct (i.e., golden) exception. 111 class GoldenScriptError(ScriptError): 112 pass 113 114 109 115 class CommitQueueTaskTest(unittest.TestCase): 110 116 def _run_through_task(self, commit_queue, expected_stderr, expected_exception=None, expect_retry=False): … … 159 165 None, 160 166 None, 161 ScriptError("MOCK apply failure"),167 GoldenScriptError("MOCK apply failure"), 162 168 ]) 163 169 expected_stderr = """run_webkit_patch: ['clean'] … … 168 174 command_failed: failure_message='Patch does not apply' script_error='MOCK apply failure' patch='197' 169 175 """ 170 self._run_through_task(commit_queue, expected_stderr, ScriptError)176 self._run_through_task(commit_queue, expected_stderr, GoldenScriptError) 171 177 172 178 def test_build_failure(self): … … 175 181 None, 176 182 None, 177 ScriptError("MOCK build failure"),183 GoldenScriptError("MOCK build failure"), 178 184 ]) 179 185 expected_stderr = """run_webkit_patch: ['clean'] … … 188 194 command_passed: success_message='Able to build without patch' patch='197' 189 195 """ 190 self._run_through_task(commit_queue, expected_stderr, ScriptError)196 self._run_through_task(commit_queue, expected_stderr, GoldenScriptError) 191 197 192 198 def test_red_build_failure(self): … … 312 318 None, 313 319 None, 314 ScriptError("MOCK test failure"),320 GoldenScriptError("MOCK test failure"), 315 321 ScriptError("MOCK test failure again"), 316 322 ]) … … 332 338 command_passed: success_message='Able to pass tests without patch' patch='197' 333 339 """ 334 self._run_through_task(commit_queue, expected_stderr, ScriptError)340 self._run_through_task(commit_queue, expected_stderr, GoldenScriptError) 335 341 336 342 def test_red_test_failure(self): … … 416 422 None, 417 423 None, 418 ScriptError("MOCK test failure"),424 GoldenScriptError("MOCK test failure"), 419 425 ScriptError("MOCK test failure again"), 420 426 ScriptError("MOCK clean test failure"), … … 444 450 command_failed: failure_message='Unable to pass tests without patch (tree is red?)' script_error='MOCK clean test failure' patch='197' 445 451 """ 446 task = self._run_through_task(commit_queue, expected_stderr, ScriptError)452 task = self._run_through_task(commit_queue, expected_stderr, GoldenScriptError) 447 453 self.assertEqual(task.results_from_patch_test_run(task._patch).failing_tests(), ["foo.html", "bar.html"]) 448 454 … … 454 460 None, 455 461 None, 456 ScriptError("MOCK land failure"),462 GoldenScriptError("MOCK land failure"), 457 463 ]) 458 464 expected_stderr = """run_webkit_patch: ['clean'] … … 470 476 """ 471 477 # FIXME: This should really be expect_retry=True for a better user experiance. 472 self._run_through_task(commit_queue, expected_stderr, ScriptError)478 self._run_through_task(commit_queue, expected_stderr, GoldenScriptError) 473 479 474 480 def _expect_validate(self, patch, is_valid): -
trunk/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py
r86020 r87601 185 185 first_results = self._delegate.layout_test_results() 186 186 first_results_archive = self._delegate.archive_last_layout_test_results(self._patch) 187 first_script_error = self._script_error 187 188 188 189 if self._expected_failures.failures_were_expected(first_results): … … 210 211 if self._build_and_test_without_patch(): 211 212 # The error from the previous ._test() run is real, report it. 212 return self.report_failure(first_results_archive, first_results )213 return self.report_failure(first_results_archive, first_results, first_script_error) 213 214 214 215 clean_tree_results = self._delegate.layout_test_results() … … 222 223 # tell if our original failures were unexpected and fail the patch if necessary. 223 224 if self._expected_failures.unexpected_failures_observed(first_results): 224 return self.report_failure(first_results_archive, first_results )225 return self.report_failure(first_results_archive, first_results, first_script_error) 225 226 226 227 # We don't know what's going on. The tree is likely very red (beyond our layout-test-results … … 236 237 return self._results_from_patch_test_run 237 238 238 def report_failure(self, results_archive=None, results=None ):239 def report_failure(self, results_archive=None, results=None, script_error=None): 239 240 if not self.validate(): 240 241 return False 241 242 self._results_archive_from_patch_test_run = results_archive 242 243 self._results_from_patch_test_run = results 243 raise s elf._script_error244 raise script_error or self._script_error 244 245 245 246 def validate(self):
Note: See TracChangeset
for help on using the changeset viewer.