[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 14:58:06 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 15fb34cae7f56f5573d8218d43b5755f667925bc
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 26 18:13:25 2010 +0000
2010-10-26 Eric Seidel <eric at webkit.org>
Reviewed by Adam Barth.
commit-queue flaky test message can list the same author more than once
https://bugs.webkit.org/show_bug.cgi?id=48268
tonikitoo reported to me over IRC this morning that he's seen
the commit-queue report flaky tests with author lists like:
"adam, adam and adam", suggesting we're not uniquing authors
before writing the message.
I fixed the uniquing and added a bunch more unit testing.
* Scripts/webkitpy/tool/commands/queues.py:
* Scripts/webkitpy/tool/commands/queues_unittest.py:
* Scripts/webkitpy/tool/mocktool.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index d9f8794..32494ef 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-10-26 Eric Seidel <eric at webkit.org>
+
+ Reviewed by Adam Barth.
+
+ commit-queue flaky test message can list the same author more than once
+ https://bugs.webkit.org/show_bug.cgi?id=48268
+
+ tonikitoo reported to me over IRC this morning that he's seen
+ the commit-queue report flaky tests with author lists like:
+ "adam, adam and adam", suggesting we're not uniquing authors
+ before writing the message.
+
+ I fixed the uniquing and added a bunch more unit testing.
+
+ * Scripts/webkitpy/tool/commands/queues.py:
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ * Scripts/webkitpy/tool/mocktool.py:
+
2010-10-26 Adam Roben <aroben at apple.com>
Pull in the FeatureDefines*.vsprops files when building DRT
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queues.py b/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
index 560cb1d..3dbe8ab 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
@@ -314,12 +314,16 @@ class CommitQueue(AbstractPatchQueue, StepSequenceErrorHandler, CommitQueueTaskD
def _author_emails_for_tests(self, flaky_tests):
test_paths = map(path_for_layout_test, flaky_tests)
commit_infos = self._tool.checkout().recent_commit_infos_for_files(test_paths)
- return [commit_info.author().bugzilla_email() for commit_info in commit_infos if commit_info.author()]
+ return set([commit_info.author().bugzilla_email() for commit_info in commit_infos if commit_info.author()])
def report_flaky_tests(self, patch, flaky_tests):
- authors = self._author_emails_for_tests(flaky_tests)
- author_nag = " The author(s) of the test(s) are %s." % join_with_separators(authors) if authors else ""
- message = "The %s encountered the following flaky tests while processing attachment %s:\n\n%s\n\nPlease file bugs against the tests.%s The commit-queue is continuing to process your patch." % (self.name, patch.id(), "\n".join(flaky_tests), author_nag)
+ message = "The %s encountered the following flaky tests while processing attachment %s:" % (self.name, patch.id())
+ message += "\n\n%s\n\n" % ("\n".join(flaky_tests))
+ message += "Please file bugs against the tests. "
+ author_emails = self._author_emails_for_tests(flaky_tests)
+ if author_emails:
+ message += "These tests were authored by %s. " % (join_with_separators(sorted(author_emails)))
+ message += "The commit-queue is continuing to process your patch."
self._tool.bugs.post_comment_to_bug(patch.bug_id(), message)
# StepSequenceErrorHandler methods
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
index 7f2480e..fa2144b 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -29,6 +29,7 @@
import os
from webkitpy.common.checkout.scm import CheckoutNeedsUpdate
+from webkitpy.common.config.committers import Committer
from webkitpy.common.net.bugzilla import Attachment
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.thirdparty.mock import Mock
@@ -197,6 +198,19 @@ class SecondThoughtsCommitQueue(CommitQueue):
return Attachment(attachment_dictionary, None)
+# Creating fake CommitInfos is a pain, so we use a mock one here.
+class MockCommitInfo(object):
+ def __init__(self, author_email):
+ self._author_email = author_email
+
+ def author(self):
+ # It's definitely possible to have commits with authors who
+ # are not in our committers.py list.
+ if not self._author_email:
+ return None
+ return Committer("Mock Committer", self._author_email)
+
+
class CommitQueueTest(QueuesTest):
def test_commit_queue(self):
expected_stderr = {
@@ -310,6 +324,19 @@ MOCK: release_work_item: commit-queue 197
"""
OutputCapture().assert_outputs(self, queue.process_work_item, [QueuesTest.mock_work_item], expected_stderr=expected_stderr)
+ def _assert_emails_for_tests(self, emails):
+ queue = CommitQueue()
+ tool = MockTool()
+ queue.bind_to_tool(tool)
+ commit_infos = [MockCommitInfo(email) for email in emails]
+ tool.checkout().recent_commit_infos_for_files = lambda paths: set(commit_infos)
+ self.assertEqual(queue._author_emails_for_tests([]), set(emails))
+
+ def test_author_emails_for_tests(self):
+ self._assert_emails_for_tests([])
+ self._assert_emails_for_tests(["test1 at test.com", "test1 at test.com"])
+ self._assert_emails_for_tests(["test1 at test.com", "test2 at test.com"])
+
def test_report_flaky_tests(self):
queue = CommitQueue()
queue.bind_to_tool(MockTool())
@@ -320,7 +347,7 @@ The commit-queue encountered the following flaky tests while processing attachme
foo/bar.html
bar/baz.html
-Please file bugs against the tests. The author(s) of the test(s) are abarth at webkit.org. The commit-queue is continuing to process your patch.
+Please file bugs against the tests. These tests were authored by abarth at webkit.org. The commit-queue is continuing to process your patch.
--- End comment ---
"""
diff --git a/WebKitTools/Scripts/webkitpy/tool/mocktool.py b/WebKitTools/Scripts/webkitpy/tool/mocktool.py
index 093bec2..ee6fd23 100644
--- a/WebKitTools/Scripts/webkitpy/tool/mocktool.py
+++ b/WebKitTools/Scripts/webkitpy/tool/mocktool.py
@@ -501,6 +501,7 @@ class MockCheckout(object):
def suggested_reviewers(self, git_commit, changed_files=None):
return [_mock_reviewer]
+
class MockUser(object):
@staticmethod
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list