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

aroben at apple.com aroben at apple.com
Wed Dec 22 15:42:11 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 27cd066b5fc67a345dcc4348204ee010646674f7
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 10 18:34:40 2010 +0000

    Print VC++ Express build logs in the same order that the projects are built
    
    Fixes <http://webkit.org/b/49326> print-vse-failure-logs prints logs
    in an unhelpful order
    
    Reviewed by Eric Seidel.
    
    * Scripts/print-vse-failure-logs:
    (PrintVisualStudioExpressLogs._build_order): Added. Uses
    print-msvc-project-dependencies to figure out the order in which
    projects are built.
    (PrintVisualStudioExpressLogs._sort_buildlogs): Added. Sorts the logs
    based on their build order and project name.
    (PrintVisualStudioExpressLogs._obj_directory): Moved code to find the
    scripts directory from here...
    (PrintVisualStudioExpressLogs._scripts_directory): ...to here.
    (PrintVisualStudioExpressLogs.main): Sort the logs before printing
    them.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71752 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 3fe546c..97536eb 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,5 +1,27 @@
 2010-11-10  Adam Roben  <aroben at apple.com>
 
+        Print VC++ Express build logs in the same order that the projects are
+        built
+
+        Fixes <http://webkit.org/b/49326> print-vse-failure-logs prints logs
+        in an unhelpful order
+
+        Reviewed by Eric Seidel.
+
+        * Scripts/print-vse-failure-logs:
+        (PrintVisualStudioExpressLogs._build_order): Added. Uses
+        print-msvc-project-dependencies to figure out the order in which
+        projects are built.
+        (PrintVisualStudioExpressLogs._sort_buildlogs): Added. Sorts the logs
+        based on their build order and project name.
+        (PrintVisualStudioExpressLogs._obj_directory): Moved code to find the
+        scripts directory from here...
+        (PrintVisualStudioExpressLogs._scripts_directory): ...to here.
+        (PrintVisualStudioExpressLogs.main): Sort the logs before printing
+        them.
+
+2010-11-10  Adam Roben  <aroben at apple.com>
+
         Only print the interesting text from VC++ Express build logs
 
         Fixes <http://webkit.org/b/49325> It's hard to find the interesting
diff --git a/WebKitTools/Scripts/print-vse-failure-logs b/WebKitTools/Scripts/print-vse-failure-logs
index 21647fd..7580465 100755
--- a/WebKitTools/Scripts/print-vse-failure-logs
+++ b/WebKitTools/Scripts/print-vse-failure-logs
@@ -36,6 +36,7 @@ import codecs
 import os
 import re
 
+from webkitpy.common.checkout import scm
 from webkitpy.common.system.executive import Executive
 from webkitpy.thirdparty import BeautifulSoup
 
@@ -53,15 +54,40 @@ class PrintVisualStudioExpressLogs(object):
                     build_log_paths.append(file_path)
         return build_log_paths
 
+    def _build_order(self):
+        """Returns a list of project names in the order in which they are built."""
+        script_path = os.path.join(self._scripts_directory(), "print-msvc-project-dependencies")
+        sln_path = os.path.join(scm.find_checkout_root(), "WebKit", "win", "WebKit.vcproj", "WebKit.sln")
+        lines = self._executive.run_command([script_path, sln_path]).splitlines()
+        order = [line.strip() for line in lines if line.find("Folder") == -1]
+        order.reverse()
+        return order
+
+    def _sort_buildlogs(self, log_paths):
+        build_order = self._build_order()
+        def sort_key(log_path):
+            project_name = os.path.basename(os.path.dirname(os.path.dirname(log_path)))
+            try:
+                index = build_order.index(project_name)
+            except ValueError:
+                # If the project isn't in the list, sort it after all items that
+                # are in the list.
+                index = len(build_order)
+            # Sort first by build order, then by project name
+            return (index, project_name)
+        return sorted(log_paths, key=sort_key)
+
     def _obj_directory(self):
-        scripts_directory = os.path.dirname(__file__)
-        build_directory_script_path = os.path.join(scripts_directory, "webkit-build-directory")
+        build_directory_script_path = os.path.join(self._scripts_directory(), "webkit-build-directory")
         # FIXME: ports/webkit.py should provide the build directory in a nice API.
         # NOTE: The windows VSE build does not seem to use different directories
         # for Debug and Release.
         build_directory = self._executive.run_command([build_directory_script_path, "--top-level"]).rstrip()
         return os.path.join(build_directory, "obj")
 
+    def _scripts_directory(self):
+        return os.path.dirname(__file__)
+
     def _relevant_text(self, log):
         soup = BeautifulSoup.BeautifulSoup(log)
         # The Output Window table is where the useful output starts in the build log.
@@ -73,8 +99,7 @@ class PrintVisualStudioExpressLogs(object):
         return "".join(result)
 
     def main(self):
-        obj_directory = self._obj_directory()
-        build_log_paths = self._find_buildlogs(obj_directory)
+        build_log_paths = self._sort_buildlogs(self._find_buildlogs(self._obj_directory()))
 
         print "Found %s Visual Studio Express Build Logs:\n%s" % (len(build_log_paths), "\n".join(build_log_paths))
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list