[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

eric at webkit.org eric at webkit.org
Wed Dec 22 12:58:11 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 407e3f5eb1b102919259a6cd20c09263d00b4748
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 3 03:16:13 2010 +0000

    2010-09-02  Eric Seidel  <eric at 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:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66707 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 0059320..2d3e662 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-02  Eric Seidel  <eric at 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:
+
 2010-09-02  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebKitTools/Scripts/validate-committer-lists b/WebKitTools/Scripts/validate-committer-lists
index ad3d358..2519e01 100755
--- a/WebKitTools/Scripts/validate-committer-lists
+++ b/WebKitTools/Scripts/validate-committer-lists
@@ -38,7 +38,7 @@ import urllib2
 from datetime import date, datetime, timedelta
 from webkitpy.common.config.committers import CommitterList
 from webkitpy.common.system.deprecated_logging import log, error
-from webkitpy.scm import Git
+from webkitpy.common.checkout.scm import Git
 
 # WebKit includes a built copy of BeautifulSoup in Scripts/webkitpy
 # so this import should always succeed.
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
index f86e9a2..fd6543c 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -28,12 +28,14 @@
 
 import os
 
+from webkitpy.common.checkout.scm import CheckoutNeedsUpdate
 from webkitpy.common.net.bugzilla import Attachment
 from webkitpy.common.system.outputcapture import OutputCapture
 from webkitpy.thirdparty.mock import Mock
 from webkitpy.tool.commands.commandtest import CommandsTest
 from webkitpy.tool.commands.queues import *
 from webkitpy.tool.commands.queuestest import QueuesTest
+from webkitpy.tool.commands.stepsequence import StepSequence
 from webkitpy.tool.mocktool import MockTool, MockSCM
 
 
@@ -133,6 +135,16 @@ class AbstractReviewQueueTest(CommandsTest):
         self.assertFalse(queue.is_terminal_status("Foo"))
 
 
+class NeedsUpdateSequence(StepSequence):
+    def _run(self, tool, options, state):
+        raise CheckoutNeedsUpdate([], 1, "", None)
+
+
+class AlwaysCommitQueueTool(object):
+    def command_by_name(self, name):
+        return CommitQueue
+
+
 class CommitQueueTest(QueuesTest):
     def test_commit_queue(self):
         expected_stderr = {
@@ -226,6 +238,20 @@ MOCK: update_work_items: commit-queue [106, 197]
         attachments.sort(queue._patch_cmp)
         self.assertEqual(attachments, expected_sort)
 
+    def test_auto_retry(self):
+        queue = CommitQueue()
+        options = Mock()
+        options.parent_command = "commit-queue"
+        tool = AlwaysCommitQueueTool()
+        sequence = NeedsUpdateSequence(None)
+
+        expected_stderr = "Commit failed because the checkout is out of date.  Please update and try again.\n"
+        OutputCapture().assert_outputs(self, sequence.run_and_handle_errors, [tool, options], expected_exception=TryAgain, expected_stderr=expected_stderr)
+
+        self.assertEquals(options.update, True)
+        self.assertEquals(options.build, False)
+        self.assertEquals(options.test, False)
+
 
 class RietveldUploadQueueTest(QueuesTest):
     def test_rietveld_upload_queue(self):

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list