Title: [152779] trunk/Tools
Revision
152779
Author
[email protected]
Date
2013-07-17 03:11:20 -0700 (Wed, 17 Jul 2013)

Log Message

Add a new find-resolved-bugs command to webkit-patch.
https://bugs.webkit.org/show_bug.cgi?id=118060

Patch by Gabor Abraham <[email protected]> on 2013-07-17
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/tool/commands/queries.py:
(PrintBaselines._platform_for_path):
(FindResolvedBugs):
(FindResolvedBugs.execute):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (152778 => 152779)


--- trunk/Tools/ChangeLog	2013-07-17 09:39:21 UTC (rev 152778)
+++ trunk/Tools/ChangeLog	2013-07-17 10:11:20 UTC (rev 152779)
@@ -1,3 +1,15 @@
+2013-07-17  Gabor Abraham  <[email protected]>
+
+        Add a new find-resolved-bugs command to webkit-patch.
+        https://bugs.webkit.org/show_bug.cgi?id=118060
+
+        Reviewed by Csaba Osztrogonác.
+
+        * Scripts/webkitpy/tool/commands/queries.py:
+        (PrintBaselines._platform_for_path):
+        (FindResolvedBugs):
+        (FindResolvedBugs.execute):
+
 2013-07-16  Balazs Kelemen  <[email protected]>
 
         [CMake] Undefined references should be detected at build time

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queries.py (152778 => 152779)


--- trunk/Tools/Scripts/webkitpy/tool/commands/queries.py	2013-07-17 09:39:21 UTC (rev 152778)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queries.py	2013-07-17 10:11:20 UTC (rev 152779)
@@ -1,6 +1,7 @@
 # Copyright (c) 2009 Google Inc. All rights reserved.
 # Copyright (c) 2009 Apple Inc. All rights reserved.
 # Copyright (c) 2012 Intel Corporation. All rights reserved.
+# Copyright (c) 2013 University of Szeged. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are
@@ -41,6 +42,7 @@
 from webkitpy.common.config.committers import CommitterList
 import webkitpy.common.config.urls as config_urls
 from webkitpy.common.net.buildbot import BuildBot
+from webkitpy.common.net.bugzilla import Bugzilla
 from webkitpy.common.net.regressionwindow import RegressionWindow
 from webkitpy.common.system.crashlogs import CrashLogs
 from webkitpy.common.system.user import User
@@ -574,3 +576,36 @@
         if platform_matchobj:
             return platform_matchobj.group(1)
         return None
+
+
+class FindResolvedBugs(Command):
+    name = "find-resolved-bugs"
+    help_text = "Collect the RESOLVED bugs in the given TestExpectations file"
+    argument_names = "TEST_EXPECTATIONS_FILE"
+
+    def execute(self, options, args, tool):
+        filename = args[0]
+        if not tool.filesystem.isfile(filename):
+            print "The given path is not a file, please pass a valid path."
+            return
+
+        ids = set()
+        inputfile = tool.filesystem.open_text_file_for_reading(filename)
+        for line in inputfile:
+            result = re.search("(https://bugs\.webkit\.org/show_bug\.cgi\?id=|webkit\.org/b/)([0-9]+)", line)
+            if result:
+                ids.add(result.group(2))
+        inputfile.close()
+
+        resolved_ids = set()
+        num_of_bugs = len(ids)
+        bugzilla = Bugzilla()
+        for i, bugid in enumerate(ids, start=1):
+            bug = bugzilla.fetch_bug(bugid)
+            print "Checking bug %s \t [%d/%d]" % (bugid, i, num_of_bugs)
+            if not bug.is_open():
+                resolved_ids.add(bugid)
+
+        print "Resolved bugs in %s :" % (filename)
+        for bugid in resolved_ids:
+            print "https://bugs.webkit.org/show_bug.cgi?id=%s" % (bugid)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to