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

abarth at webkit.org abarth at webkit.org
Wed Dec 22 14:44:42 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3e299cd3c1962b3d4bbcbc726ebcf327fa4886ba
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 19 04:11:01 2010 +0000

    2010-10-18  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            CC authors of flaky tests when the commit-queue hits a flaky test
            https://bugs.webkit.org/show_bug.cgi?id=47872
    
            * Scripts/webkitpy/common/checkout/api.py:
            * Scripts/webkitpy/common/net/layouttestresults.py:
            * 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@70023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ce73ced..13c884f 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-18  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        CC authors of flaky tests when the commit-queue hits a flaky test
+        https://bugs.webkit.org/show_bug.cgi?id=47872
+
+        * Scripts/webkitpy/common/checkout/api.py:
+        * Scripts/webkitpy/common/net/layouttestresults.py:
+        * Scripts/webkitpy/tool/commands/queues.py:
+        * Scripts/webkitpy/tool/commands/queues_unittest.py:
+        * Scripts/webkitpy/tool/mocktool.py:
+
 2010-10-18  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/Scripts/webkitpy/common/checkout/api.py b/WebKitTools/Scripts/webkitpy/common/checkout/api.py
index e040488..7deac8f 100644
--- a/WebKitTools/Scripts/webkitpy/common/checkout/api.py
+++ b/WebKitTools/Scripts/webkitpy/common/checkout/api.py
@@ -115,10 +115,13 @@ class Checkout(object):
         # FIXME: We should sort and label the ChangeLog messages like commit-log-editor does.
         return CommitMessage("".join(changelog_messages).splitlines())
 
+    def recent_commit_infos_for_files(self, paths):
+        revisions = set(sum(map(self._scm.revisions_changing_file, paths), []))
+        return set(map(self.commit_info_for_revision, revisions))
+
     def suggested_reviewers(self, git_commit):
         changed_files = self.modified_non_changelogs(git_commit)
-        revisions = set(sum(map(self._scm.revisions_changing_file, changed_files), []))
-        commit_infos = set(map(self.commit_info_for_revision, revisions))
+        commit_infos = self.recent_commit_infos_for_files(changed_files)
         reviewers = [commit_info.reviewer() for commit_info in commit_infos if commit_info.reviewer()]
         reviewers.extend([commit_info.author() for commit_info in commit_infos if commit_info.author() and commit_info.author().can_review])
         return sorted(set(reviewers))
diff --git a/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py b/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py
index eb5ea7d..2f7b3e6 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py
@@ -33,6 +33,12 @@ from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup, SoupStrainer
 
 # FIXME: This should be unified with all the layout test results code in the layout_tests package
 # This doesn't belong in common.net, but we don't have a better place for it yet.
+def path_for_layout_test(test_name):
+    return "LayoutTests/%s" % test_name
+
+
+# FIXME: This should be unified with all the layout test results code in the layout_tests package
+# This doesn't belong in common.net, but we don't have a better place for it yet.
 class LayoutTestResults(object):
     """This class knows how to parse old-run-webkit-tests results.html files."""
 
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queues.py b/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
index 082ac40..c7866dc 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queues.py
@@ -39,7 +39,7 @@ from optparse import make_option
 from StringIO import StringIO
 
 from webkitpy.common.net.bugzilla import CommitterValidator
-from webkitpy.common.net.layouttestresults import LayoutTestResults
+from webkitpy.common.net.layouttestresults import path_for_layout_test, LayoutTestResults
 from webkitpy.common.net.statusserver import StatusServer
 from webkitpy.common.system.executive import ScriptError
 from webkitpy.common.system.deprecated_logging import error, log
@@ -289,9 +289,16 @@ class CommitQueue(AbstractPatchQueue, StepSequenceErrorHandler, CommitQueueTaskD
     def refetch_patch(self, patch):
         return self._tool.bugs.fetch_attachment(patch.id())
 
+    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()]
+
     def report_flaky_tests(self, patch, flaky_tests):
-        message = "The %s encountered the following flaky tests while processing attachment %s:\n\n%s\n\nPlease file bugs against the tests.  The commit-queue is continuing to process your patch." % (self.name, patch.id(), "\n".join(flaky_tests))
-        self._tool.bugs.post_comment_to_bug(patch.bug_id(), message, cc=self.watchers)
+        authors = self._author_emails_for_tests(flaky_tests)
+        cc_explaination = "  The author(s) of the test(s) have been CCed on this bug." 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), cc_explaination)
+        self._tool.bugs.post_comment_to_bug(patch.bug_id(), message, cc=authors)
 
     # StepSequenceErrorHandler methods
 
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
index 8ac8721..0d0db4d 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -324,14 +324,14 @@ MOCK: update_status: commit-queue Retry
     def test_report_flaky_tests(self):
         queue = CommitQueue()
         queue.bind_to_tool(MockTool())
-        expected_stderr = """MOCK bug comment: bug_id=142, cc=[]
+        expected_stderr = """MOCK bug comment: bug_id=142, cc=['abarth at webkit.org']
 --- Begin comment ---
 The commit-queue encountered the following flaky tests while processing attachment 197:
 
 foo/bar.html
 bar/baz.html
 
-Please file bugs against the tests.  The commit-queue is continuing to process your patch.
+Please file bugs against the tests.  The author(s) of the test(s) have been CCed on this bug.  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 45b1a2a..ce5fa02 100644
--- a/WebKitTools/Scripts/webkitpy/tool/mocktool.py
+++ b/WebKitTools/Scripts/webkitpy/tool/mocktool.py
@@ -472,6 +472,9 @@ class MockCheckout(object):
     def bug_id_for_revision(self, svn_revision):
         return 12345
 
+    def recent_commit_infos_for_files(self, paths):
+        return [self.commit_info_for_revision(32)]
+
     def modified_changelogs(self, git_commit):
         # Ideally we'd return something more interesting here.  The problem is
         # that LandDiff will try to actually read the patch from disk!

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list