[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

eric at webkit.org eric at webkit.org
Sun Feb 20 23:12:19 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 4a69937776fdf197934e03ebf2239142aaae5960
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 18 22:59:09 2011 +0000

    2011-01-18  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Adam Barth.
    
            commit-queue dies when test archiving fails
            https://bugs.webkit.org/show_bug.cgi?id=52617
    
            I looked at the machine and it had 10 archives already
            thus find_unused_name was returning None.  I've upped
            the limit to 100 (per bug) and tested the case where
            find_unused_name returns None (making archive return None).
    
            * Scripts/webkitpy/common/system/workspace.py:
            * Scripts/webkitpy/common/system/workspace_unittest.py:
            * Scripts/webkitpy/tool/bot/commitqueuetask.py:
            * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
            * Scripts/webkitpy/tool/commands/queues.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76071 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 2f7e9d6..bcdcb33 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,21 @@
+2011-01-18  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Adam Barth.
+
+        commit-queue dies when test archiving fails
+        https://bugs.webkit.org/show_bug.cgi?id=52617
+
+        I looked at the machine and it had 10 archives already
+        thus find_unused_name was returning None.  I've upped
+        the limit to 100 (per bug) and tested the case where
+        find_unused_name returns None (making archive return None).
+
+        * Scripts/webkitpy/common/system/workspace.py:
+        * Scripts/webkitpy/common/system/workspace_unittest.py:
+        * Scripts/webkitpy/tool/bot/commitqueuetask.py:
+        * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+        * Scripts/webkitpy/tool/commands/queues.py:
+
 2011-01-18  Dirk Pranke  <dpranke at chromium.org>
 
         Reviewed by Ojan Vafai.
diff --git a/Tools/Scripts/webkitpy/common/system/workspace.py b/Tools/Scripts/webkitpy/common/system/workspace.py
index 3b755ad..afb0009 100644
--- a/Tools/Scripts/webkitpy/common/system/workspace.py
+++ b/Tools/Scripts/webkitpy/common/system/workspace.py
@@ -36,7 +36,7 @@ class Workspace(object):
         self._filesystem = filesystem
         self._executive = executive  # FIXME: Remove if create_zip is moved to python.
 
-    def find_unused_filename(self, directory, name, extension, search_limit=10):
+    def find_unused_filename(self, directory, name, extension, search_limit=100):
         for count in range(search_limit):
             if count:
                 target_name = "%s-%s.%s" % (name, count, extension)
diff --git a/Tools/Scripts/webkitpy/common/system/workspace_unittest.py b/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
index e5fbb26..6be7664 100644
--- a/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
@@ -40,10 +40,13 @@ class WorkspaceTest(unittest.TestCase):
         filesystem = MockFileSystem({
             "dir/foo.jpg": "",
             "dir/foo-1.jpg": "",
+            "dir/foo-2.jpg": "",
         })
         workspace = Workspace(filesystem, None)
         self.assertEqual(workspace.find_unused_filename("bar", "bar", "bar"), "bar/bar.bar")
-        self.assertEqual(workspace.find_unused_filename("dir", "foo", "jpg"), "dir/foo-2.jpg")
+        self.assertEqual(workspace.find_unused_filename("dir", "foo", "jpg", search_limit=1), None)
+        self.assertEqual(workspace.find_unused_filename("dir", "foo", "jpg", search_limit=2), None)
+        self.assertEqual(workspace.find_unused_filename("dir", "foo", "jpg"), "dir/foo-3.jpg")
 
     def test_create_zip(self):
         workspace = Workspace(None, MockExecutive(should_log=True))
diff --git a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
index 3be2556..b22138d 100644
--- a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
+++ b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
@@ -187,7 +187,9 @@ class CommitQueueTask(object):
         first_failing_tests = [result.filename for result in first_results]
         first_results_archive = self._delegate.archive_last_layout_test_results(self._patch)
         if self._test():
-            self._report_flaky_tests(first_results, first_results_archive)
+            # Only report flaky tests if we were successful at archiving results.
+            if first_results_archive:
+                self._report_flaky_tests(first_results, first_results_archive)
             return True
 
         second_results = self._failing_results_from_last_run()
diff --git a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
index 26231ae..87d0ab5 100644
--- a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
@@ -209,6 +209,34 @@ command_passed: success_message='Landed patch' patch='197'
 """
         self._run_through_task(commit_queue, expected_stderr)
 
+    def test_failed_archive(self):
+        commit_queue = MockCommitQueue([
+            None,
+            None,
+            None,
+            None,
+            ScriptError("MOCK tests failure"),
+        ])
+        # It's possible delegate to fail to archive layout tests, don't try to report
+        # flaky tests when that happens.
+        commit_queue.archive_last_layout_test_results = lambda patch: None
+        expected_stderr = """run_webkit_patch: ['clean']
+command_passed: success_message='Cleaned working directory' patch='197'
+run_webkit_patch: ['update']
+command_passed: success_message='Updated working directory' patch='197'
+run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197]
+command_passed: success_message='Applied patch' patch='197'
+run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
+command_passed: success_message='Built patch' patch='197'
+run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive']
+command_failed: failure_message='Patch does not pass tests' script_error='MOCK tests failure' patch='197'
+run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive']
+command_passed: success_message='Passed tests' patch='197'
+run_webkit_patch: ['land-attachment', '--force-clean', '--ignore-builders', '--non-interactive', '--parent-command=commit-queue', 197]
+command_passed: success_message='Landed patch' patch='197'
+"""
+        self._run_through_task(commit_queue, expected_stderr)
+
     _double_flaky_test_counter = 0
 
     def test_double_flaky_test_failure(self):
diff --git a/Tools/Scripts/webkitpy/tool/commands/queues.py b/Tools/Scripts/webkitpy/tool/commands/queues.py
index 5bc880b..9e50dd4 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queues.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queues.py
@@ -323,6 +323,8 @@ class CommitQueue(AbstractPatchQueue, StepSequenceErrorHandler, CommitQueueTaskD
         results_name, _ = os.path.splitext(os.path.basename(results_directory))
         # Note: We name the zip with the bug_id instead of patch_id to match work_item_log_path().
         zip_path = self._tool.workspace.find_unused_filename(self._log_directory(), "%s-%s" % (patch.bug_id(), results_name), "zip")
+        if not zip_path:
+            return None
         archive = self._tool.workspace.create_zip(zip_path, results_directory)
         # Remove the results directory to prevent http logs, etc. from getting huge between runs.
         # We could have create_zip remove the original, but this is more explicit.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list