Changeset 70171 in webkit
- Timestamp:
- Oct 20, 2010 1:44:56 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r70169 r70171 74 74 needs to be done. Removed code that tracked the modified timestamp of 75 75 the library, as it is no longer needed. 76 77 2010-10-19 Eric Seidel <eric@webkit.org> 78 79 Reviewed by Adam Barth. 80 81 EWS should test patches with r+ 82 https://bugs.webkit.org/show_bug.cgi?id=35460 83 84 * QueueStatusServer/handlers/submittoews.py: 85 * QueueStatusServer/model/queues.py: 86 * Scripts/webkitpy/tool/bot/patchcollection.py: Removed. 87 * Scripts/webkitpy/tool/bot/patchcollection_unittest.py: Removed. 88 * Scripts/webkitpy/tool/commands/queues.py: 76 89 77 90 2010-10-19 Eric Seidel <eric@webkit.org> -
trunk/WebKitTools/QueueStatusServer/handlers/submittoews.py
r70019 r70171 40 40 41 41 def _should_add_to_ews_queue(self, queue, attachment): 42 # This assert() is here to make sure we're not submitting to the commit-queue. 43 # The commit-queue clients check each patch anyway, but there is not sense 44 # in adding things to the commit-queue when they won't be processed by it. 42 45 assert(queue.is_ews()) 43 46 latest_status = attachment.status_for_queue(queue) … … 52 55 53 56 def _add_attachment_to_ews_queues(self, attachment): 54 for queue in Queue.all_ews(): 57 for queue in Queue.all_ews(): # all_ews() currently includes the style-queue 55 58 if self._should_add_to_ews_queue(queue, attachment): 56 59 queue.work_items().add_work_item(attachment.id) -
trunk/WebKitTools/QueueStatusServer/model/queues.py
r70079 r70171 106 106 107 107 def is_ews(self): 108 return self._name.endswith("-ews") 108 # Note: The style-queue is just like an EWS in that it has an EWS 109 # bubble, and it works off of the r? patches. If at some later 110 # point code wants to not treat the style-queue as an EWS 111 # (e.g. expecting is_ews() queues to have build results?) 112 # then we should fix all callers and change this check. 113 return self._name.endswith("-ews") or self._name == "style-queue" -
trunk/WebKitTools/Scripts/webkitpy/tool/bot/feeders.py
r70117 r70171 48 48 49 49 def _update_work_items(self, item_ids): 50 # FIXME: This is the last use of update_work_items, the commit-queue 51 # should move to feeding patches one at a time like the EWS does. 50 52 self._tool.status_server.update_work_items(self.queue_name, item_ids) 51 53 log("Feeding %s items %s" % (self.queue_name, item_ids)) -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
r70022 r70171 49 49 "begin_work_queue": self._default_begin_work_queue_stderr(ews.name, os.getcwd()), # FIXME: Use of os.getcwd() is wrong, should be scm.checkout_root 50 50 "handle_unexpected_error": "Mock error message\n", 51 "next_work_item": " MOCK: update_work_items: %(name)s [103]\n" % string_replacemnts,52 "process_work_item": "MOCK: update_status: %(name)s Pass\n " % string_replacemnts,51 "next_work_item": "", 52 "process_work_item": "MOCK: update_status: %(name)s Pass\nMOCK: release_work_item: %(name)s 197\n" % string_replacemnts, 53 53 "handle_script_error": "MOCK: update_status: %(name)s ScriptError error message\nMOCK bug comment: bug_id=142, cc=%(watchers)s\n--- Begin comment ---\nAttachment 197 did not build on %(port)s:\nBuild output: http://dummy_url\n--- End comment ---\n\n" % string_replacemnts, 54 54 } -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
r70117 r70171 47 47 from webkitpy.tool.bot.commitqueuetask import CommitQueueTask, CommitQueueTaskDelegate 48 48 from webkitpy.tool.bot.feeders import CommitQueueFeeder, EWSFeeder 49 from webkitpy.tool.bot.patchcollection import PersistentPatchCollection, PersistentPatchCollectionDelegate50 49 from webkitpy.tool.bot.queueengine import QueueEngine, QueueEngineDelegate 51 50 from webkitpy.tool.grammar import pluralize 52 51 from webkitpy.tool.multicommandtool import Command, TryAgain 52 53 53 54 54 class AbstractQueue(Command, QueueEngineDelegate): … … 328 328 329 329 330 # FIXME: All the Rietveld code is no longer used and should be deleted. 330 331 class RietveldUploadQueue(AbstractPatchQueue, StepSequenceErrorHandler): 331 332 name = "rietveld-upload-queue" … … 373 374 374 375 375 class AbstractReviewQueue(AbstractPatchQueue, PersistentPatchCollectionDelegate,StepSequenceErrorHandler):376 class AbstractReviewQueue(AbstractPatchQueue, StepSequenceErrorHandler): 376 377 """This is the base-class for the EWS queues and the style-queue.""" 377 378 def __init__(self, options=None): … … 379 380 380 381 def review_patch(self, patch): 381 raise NotImplementedError, "subclasses must implement" 382 383 # PersistentPatchCollectionDelegate methods 384 385 def collection_name(self): 386 return self.name 387 388 def fetch_potential_patch_ids(self): 389 return self._tool.bugs.queries.fetch_attachment_ids_from_review_queue() 390 391 def status_server(self): 392 return self._tool.status_server 393 394 def is_terminal_status(self, status): 395 return status == "Pass" or status == "Fail" or status.startswith("Error:") 382 raise NotImplementedError("subclasses must implement") 396 383 397 384 # AbstractPatchQueue methods … … 399 386 def begin_work_queue(self): 400 387 AbstractPatchQueue.begin_work_queue(self) 401 self._patches = PersistentPatchCollection(self)402 388 403 389 def next_work_item(self): 404 patch_id = self._patches.next() 405 if patch_id: 406 return self._tool.bugs.fetch_attachment(patch_id) 390 patch_id = self._fetch_next_work_item() 391 if not patch_id: 392 return None 393 return self._tool.bugs.fetch_attachment(patch_id) 407 394 408 395 def should_proceed_with_work_item(self, patch): 409 raise NotImplementedError , "subclasses must implement"396 raise NotImplementedError("subclasses must implement") 410 397 411 398 def process_work_item(self, patch): … … 419 406 self._did_fail(patch) 420 407 raise e 408 finally: 409 self._release_work_item(patch) 421 410 422 411 def handle_unexpected_error(self, patch, message): -
trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
r70117 r70171 156 156 157 157 158 class AbstractReviewQueueTest(CommandsTest):159 def test_patch_collection_delegate_methods(self):160 queue = TestReviewQueue()161 tool = MockTool()162 queue.bind_to_tool(tool)163 queue._options = Mock()164 queue._options.port = None165 self.assertEquals(queue.collection_name(), "test-review-queue")166 self.assertEquals(queue.fetch_potential_patch_ids(), [103])167 queue.status_server()168 self.assertTrue(queue.is_terminal_status("Pass"))169 self.assertTrue(queue.is_terminal_status("Fail"))170 self.assertTrue(queue.is_terminal_status("Error: Your patch exploded"))171 self.assertFalse(queue.is_terminal_status("Foo"))172 173 174 158 class NeedsUpdateSequence(StepSequence): 175 159 def _run(self, tool, options, state): … … 366 350 expected_stderr = { 367 351 "begin_work_queue": self._default_begin_work_queue_stderr("style-queue", MockSCM.fake_checkout_root), 368 "next_work_item": " MOCK: update_work_items: style-queue [103]\n",352 "next_work_item": "", 369 353 "should_proceed_with_work_item": "MOCK: update_status: style-queue Checking style\n", 370 "process_work_item": "MOCK: update_status: style-queue Pass\n ",354 "process_work_item": "MOCK: update_status: style-queue Pass\nMOCK: release_work_item: style-queue 197\n", 371 355 "handle_unexpected_error": "Mock error message\n", 372 356 "handle_script_error": "MOCK: update_status: style-queue ScriptError error message\nMOCK bug comment: bug_id=142, cc=[]\n--- Begin comment ---\nAttachment 197 did not pass style-queue:\n\nScriptError error message\n\nIf any of these errors are false positives, please file a bug against check-webkit-style.\n--- End comment ---\n\n",
Note: See TracChangeset
for help on using the changeset viewer.