Changeset 51018 in webkit


Ignore:
Timestamp:
Nov 16, 2009 1:25:03 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2009-11-16 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Unit test WorkQueue
https://bugs.webkit.org/show_bug.cgi?id=31531

Adds basic unit testing for WorkQueue. Just runs through one cycle.

  • Scripts/bugzilla-tool:
  • Scripts/modules/statusbot.py:
  • Scripts/modules/workqueue.py:
  • Scripts/modules/workqueue_unittest.py: Added.
  • Scripts/run-webkit-unittests:
Location:
trunk/WebKitTools
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r51017 r51018  
     12009-11-16  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Unit test WorkQueue
     6        https://bugs.webkit.org/show_bug.cgi?id=31531
     7
     8        Adds basic unit testing for WorkQueue.  Just runs through one cycle.
     9
     10        * Scripts/bugzilla-tool:
     11        * Scripts/modules/statusbot.py:
     12        * Scripts/modules/workqueue.py:
     13        * Scripts/modules/workqueue_unittest.py: Added.
     14        * Scripts/run-webkit-unittests:
     15
    1162009-11-16  Eric Seidel  <eric@webkit.org>
    217
  • trunk/WebKitTools/Scripts/bugzilla-tool

    r51017 r51018  
    723723        log("Running WebKit Commit Queue. %s" % datetime.now().strftime(WorkQueue.log_date_format))
    724724
     725    def should_continue_work_queue(self):
     726        return True
     727
    725728    def next_work_item(self):
    726729        # Fetch patches instead of just bug ids to that we validate reviewer/committer flags on every patch.
  • trunk/WebKitTools/Scripts/modules/statusbot.py

    r48730 r51018  
    5757
    5858    def update_status(self, status, bug_id=None, patch_id=None):
     59        # During unit testing, statusbot_host is None
     60        if not self.statusbot_host:
     61            return
    5962        self.browser.open(self.update_status_url)
    6063        self.browser.select_form(name="update_status")
  • trunk/WebKitTools/Scripts/modules/workqueue.py

    r51014 r51018  
    3434from datetime import datetime, timedelta
    3535
    36 from logging import log, OutputTee
    37 from scm import ScriptError
    38 from statusbot import StatusBot
     36from modules.logging import log, OutputTee
     37from modules.scm import ScriptError
     38from modules.statusbot import StatusBot
    3939
    4040class WorkQueueDelegate:
     
    4949
    5050    def begin_work_queue(self):
     51        raise NotImplementedError, "subclasses must implement"
     52
     53    def should_continue_work_queue(self):
    5154        raise NotImplementedError, "subclasses must implement"
    5255
     
    7982
    8083        self._delegate.begin_work_queue()
    81         while (True):
     84        while (self._delegate.should_continue_work_queue()):
    8285            self._ensure_work_log_closed()
    8386            try:
  • trunk/WebKitTools/Scripts/run-webkit-unittests

    r47955 r51018  
    3838from modules.logging_unittest import *
    3939from modules.scm_unittest import *
     40from modules.workqueue_unittest import *
    4041
    4142if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.