[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c

eric at webkit.org eric at webkit.org
Mon Dec 27 16:25:35 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1ef080e2f7325588db0fdccee469e5955307ed9f
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 20 23:55:36 2010 +0000

    2010-12-20  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Adam Barth.
    
            commit-queue should include bot id when attaching failure diffs
            https://bugs.webkit.org/show_bug.cgi?id=51280
    
            This is a tiny change to include the bot id in the name of the attachment.
            Most of this diff is just changing the unit test expectations
            now that I hid the comment printing when the comment is None.
    
            * Scripts/webkitpy/tool/bot/flakytestreporter.py:
            * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
            * Scripts/webkitpy/tool/commands/upload_unittest.py:
            * Scripts/webkitpy/tool/mocktool.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74373 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 8343079..80a05d1 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-20  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Adam Barth.
+
+        commit-queue should include bot id when attaching failure diffs
+        https://bugs.webkit.org/show_bug.cgi?id=51280
+
+        This is a tiny change to include the bot id in the name of the attachment.
+        Most of this diff is just changing the unit test expectations
+        now that I hid the comment printing when the comment is None.
+
+        * Scripts/webkitpy/tool/bot/flakytestreporter.py:
+        * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
+        * Scripts/webkitpy/tool/commands/upload_unittest.py:
+        * Scripts/webkitpy/tool/mocktool.py:
+
 2010-12-20  Jeff Miller  <jeffm at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
index cca21d8..01cbf39 100644
--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
@@ -171,7 +171,8 @@ If you would like to track this test fix with another bug, please close this bug
             # there is a high probaility it's totally wrong.
             if self._tool.filesystem.exists(results_diff_path):
                 results_diff = self._tool.filesystem.read_binary_file(results_diff_path)
-                self._tool.bugs.add_attachment_to_bug(flake_bug_id, results_diff, "Failure diff from bot", filename="failure.diff")
+                bot_id = self._tool.status_server.bot_id or "bot"
+                self._tool.bugs.add_attachment_to_bug(flake_bug_id, results_diff, "Failure diff from %s" % bot_id, filename="failure.diff")
             else:
                 _log.error("%s does not exist as expected, not uploading." % results_diff_path)
             message += "%s bug %s%s\n" % (flaky_test, flake_bug_id, self._optional_author_string(author_emails))
diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
index 98769ce..f72fb28 100644
--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
@@ -97,7 +97,8 @@ blocked: 50856
 
     def test_report_flaky_tests_creating_bug(self):
         tool = MockTool()
-        tool.filesystem = MockFileSystem({"/mock/foo/bar.diff": "mock"})
+        tool.filesystem = MockFileSystem({"/mock/foo/bar-diffs.txt": "mock"})
+        tool.status_server = MockStatusServer(bot_id="mock-bot-id")
         reporter = FlakyTestReporter(tool, 'dummy-queue')
         reporter._lookup_bug_for_flaky_test = lambda bug_id: None
         patch = tool.bugs.fetch_attachment(197)
@@ -110,7 +111,7 @@ foo/bar.html was authored by abarth at webkit.org.
 http://trac.webkit.org/browser/trunk/LayoutTests/foo/bar.html
 
 The dummy-queue just saw foo/bar.html flake while processing attachment 197 on bug 42.
-Port: MockPort  Platform: MockPlatform 1.0
+Bot: mock-bot-id  Port: MockPort  Platform: MockPlatform 1.0
 
 The bots will update this with information from each new failure.
 
@@ -119,6 +120,7 @@ If you would like to track this test fix with another bug, please close this bug
 component: Tools / Tests
 cc: abarth at webkit.org
 blocked: 50856
+MOCK add_attachment_to_bug: bug_id=78, description=Failure diff from mock-bot-id filename=failure.diff
 MOCK bug comment: bug_id=42, cc=None
 --- Begin comment ---
 The dummy-queue encountered the following flaky tests while processing attachment 197:
diff --git a/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py b/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
index 052f4d9..a347b00 100644
--- a/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
@@ -63,16 +63,13 @@ class UploadCommandsTest(CommandsTest):
 MOCK: user.open_url: file://...
 Obsoleting 2 old patches on bug 42
 MOCK add_patch_to_bug: bug_id=42, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False
--- Begin comment --
-None
--- End comment --
 MOCK: user.open_url: http://example.com/42
 """
         expected_stdout = "Was that diff correct?\n"
         self.assert_execute_outputs(Post(), [42], options=options, expected_stdout=expected_stdout, expected_stderr=expected_stderr)
 
     def test_land_safely(self):
-        expected_stderr = "Obsoleting 2 old patches on bug 42\nMOCK add_patch_to_bug: bug_id=42, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True\n-- Begin comment --\nNone\n-- End comment --\n"
+        expected_stderr = "Obsoleting 2 old patches on bug 42\nMOCK add_patch_to_bug: bug_id=42, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True\n"
         self.assert_execute_outputs(LandSafely(), [42], expected_stderr=expected_stderr)
 
     def test_prepare_diff_with_arg(self):
@@ -95,9 +92,6 @@ MOCK: user.open_url: http://example.com/42
 MOCK: user.open_url: file://...
 Obsoleting 2 old patches on bug 42
 MOCK add_patch_to_bug: bug_id=42, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False
--- Begin comment --
-None
--- End comment --
 MOCK: user.open_url: http://example.com/42
 """
         expected_stdout = "Was that diff correct?\n"
@@ -109,7 +103,18 @@ MOCK: user.open_url: http://example.com/42
         options = Mock()
         options.bug_id = 42
         options.comment = "MOCK comment"
-        expected_stderr = "Bug: <http://example.com/42> Bug with two r+'d and cq+'d patches, one of which has an invalid commit-queue setter.\nRevision: 9876\nMOCK: user.open_url: http://example.com/42\nAdding comment to Bug 42.\nMOCK bug comment: bug_id=42, cc=None\n--- Begin comment ---\nMOCK comment\n\nCommitted r9876: <http://trac.webkit.org/changeset/9876>\n--- End comment ---\n\n"
+        expected_stderr = """Bug: <http://example.com/42> Bug with two r+'d and cq+'d patches, one of which has an invalid commit-queue setter.
+Revision: 9876
+MOCK: user.open_url: http://example.com/42
+Adding comment to Bug 42.
+MOCK bug comment: bug_id=42, cc=None
+--- Begin comment ---
+MOCK comment
+
+Committed r9876: <http://trac.webkit.org/changeset/9876>
+--- End comment ---
+
+"""
         expected_stdout = "Is this correct?\n"
         self.assert_execute_outputs(MarkBugFixed(), [], expected_stdout=expected_stdout, expected_stderr=expected_stderr, tool=tool, options=options)
 
diff --git a/Tools/Scripts/webkitpy/tool/mocktool.py b/Tools/Scripts/webkitpy/tool/mocktool.py
index 9133b37..30a4bc3 100644
--- a/Tools/Scripts/webkitpy/tool/mocktool.py
+++ b/Tools/Scripts/webkitpy/tool/mocktool.py
@@ -342,6 +342,18 @@ class MockBugzilla(Mock):
         log("MOCK bug comment: bug_id=%s, cc=%s\n--- Begin comment ---\n%s\n--- End comment ---\n" % (
             bug_id, cc, comment_text))
 
+    def add_attachment_to_bug(self,
+                              bug_id,
+                              file_or_string,
+                              description,
+                              filename=None,
+                              comment_text=None):
+        log("MOCK add_attachment_to_bug: bug_id=%s, description=%s filename=%s" % (bug_id, description, filename))
+        if comment_text:
+            log("-- Begin comment --")
+            log(comment_text)
+            log("-- End comment --")
+
     def add_patch_to_bug(self,
                          bug_id,
                          diff,
@@ -352,9 +364,10 @@ class MockBugzilla(Mock):
                          mark_for_landing=False):
         log("MOCK add_patch_to_bug: bug_id=%s, description=%s, mark_for_review=%s, mark_for_commit_queue=%s, mark_for_landing=%s" %
             (bug_id, description, mark_for_review, mark_for_commit_queue, mark_for_landing))
-        log("-- Begin comment --")
-        log(comment_text)
-        log("-- End comment --")
+        if comment_text:
+            log("-- Begin comment --")
+            log(comment_text)
+            log("-- End comment --")
 
 
 class MockBuilder(object):

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list