Changeset 66707 in webkit


Ignore:
Timestamp:
Sep 2, 2010 8:16:13 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-09-02 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Add a unit test for commit-queue retries
https://bugs.webkit.org/show_bug.cgi?id=45162

I think commit-queue retries are not correctly avoiding
build and test on retries. So I started testing the code.
Unfortunately this test did not find the bug. But now
that we have the test we might as well keep it.
I also fixed a broken import in validate-committer-lists.

  • Scripts/validate-committer-lists:
  • Scripts/webkitpy/tool/commands/queues_unittest.py:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r66701 r66707  
     12010-09-02  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Add a unit test for commit-queue retries
     6        https://bugs.webkit.org/show_bug.cgi?id=45162
     7
     8        I think commit-queue retries are not correctly avoiding
     9        build and test on retries.  So I started testing the code.
     10        Unfortunately this test did not find the bug.  But now
     11        that we have the test we might as well keep it.
     12        I also fixed a broken import in validate-committer-lists.
     13
     14        * Scripts/validate-committer-lists:
     15        * Scripts/webkitpy/tool/commands/queues_unittest.py:
     16
    1172010-09-02  Kent Tamura  <tkent@chromium.org>
    218
  • trunk/WebKitTools/Scripts/validate-committer-lists

    r56544 r66707  
    3939from webkitpy.common.config.committers import CommitterList
    4040from webkitpy.common.system.deprecated_logging import log, error
    41 from webkitpy.scm import Git
     41from webkitpy.common.checkout.scm import Git
    4242
    4343# WebKit includes a built copy of BeautifulSoup in Scripts/webkitpy
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py

    r66304 r66707  
    2929import os
    3030
     31from webkitpy.common.checkout.scm import CheckoutNeedsUpdate
    3132from webkitpy.common.net.bugzilla import Attachment
    3233from webkitpy.common.system.outputcapture import OutputCapture
     
    3536from webkitpy.tool.commands.queues import *
    3637from webkitpy.tool.commands.queuestest import QueuesTest
     38from webkitpy.tool.commands.stepsequence import StepSequence
    3739from webkitpy.tool.mocktool import MockTool, MockSCM
    3840
     
    134136
    135137
     138class NeedsUpdateSequence(StepSequence):
     139    def _run(self, tool, options, state):
     140        raise CheckoutNeedsUpdate([], 1, "", None)
     141
     142
     143class AlwaysCommitQueueTool(object):
     144    def command_by_name(self, name):
     145        return CommitQueue
     146
     147
    136148class CommitQueueTest(QueuesTest):
    137149    def test_commit_queue(self):
     
    227239        self.assertEqual(attachments, expected_sort)
    228240
     241    def test_auto_retry(self):
     242        queue = CommitQueue()
     243        options = Mock()
     244        options.parent_command = "commit-queue"
     245        tool = AlwaysCommitQueueTool()
     246        sequence = NeedsUpdateSequence(None)
     247
     248        expected_stderr = "Commit failed because the checkout is out of date.  Please update and try again.\n"
     249        OutputCapture().assert_outputs(self, sequence.run_and_handle_errors, [tool, options], expected_exception=TryAgain, expected_stderr=expected_stderr)
     250
     251        self.assertEquals(options.update, True)
     252        self.assertEquals(options.build, False)
     253        self.assertEquals(options.test, False)
     254
    229255
    230256class RietveldUploadQueueTest(QueuesTest):
Note: See TracChangeset for help on using the changeset viewer.