[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:59:38 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a26b9e7ba12fcf8b90ad5accc3f3b2d0af8a6da7
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 27 04:29:08 2010 +0000

    2010-10-26  Eric Seidel  <eric at webkit.org>
    
            Reviewed by David Kilzer.
    
            build-webkit should collect Visual Studio Express logs and display them
            https://bugs.webkit.org/show_bug.cgi?id=39199
    
            * Scripts/build-webkit:
            * Scripts/print-vse-failure-logs: Added.
            * Scripts/webkitdirs.pm:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70607 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index fe6274a..7579cbb 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-26  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by David Kilzer.
+
+        build-webkit should collect Visual Studio Express logs and display them
+        https://bugs.webkit.org/show_bug.cgi?id=39199
+
+        * Scripts/build-webkit:
+        * Scripts/print-vse-failure-logs: Added.
+        * Scripts/webkitdirs.pm:
+
 2010-10-26  David Kilzer  <ddkilzer at apple.com>
 
         <http://webkit.org/b/48224> build-webkit: add support for --meter-tag switch
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit
index 70c7b98..31a0335 100755
--- a/WebKitTools/Scripts/build-webkit
+++ b/WebKitTools/Scripts/build-webkit
@@ -525,9 +525,14 @@ for my $dir (@projects) {
     }
 
     if (exitStatus($result)) {
+        my $scriptDir = relativeScriptsDir();
+        if (usingVisualStudioExpress()) {
+            # Visual Studio Express is so lame it can't stdout build failures.
+            # So we find its logs and dump them to the console ourselves.
+            system(File::Spec->catfile($scriptDir, "print-vse-failure-logs"));
+        }
         if (isAppleWinWebKit()) {
             print "\n\n===== BUILD FAILED ======\n\n";
-            my $scriptDir = relativeScriptsDir();
             print "Please ensure you have run $scriptDir/update-webkit to install dependencies.\n\n";
             my $baseProductDir = baseProductDir();
             print "You can view build errors by checking the BuildLog.htm files located at:\n$baseProductDir/obj/<project>/<config>.\n";
diff --git a/WebKitTools/Scripts/print-vse-failure-logs b/WebKitTools/Scripts/print-vse-failure-logs
new file mode 100755
index 0000000..37103ee
--- /dev/null
+++ b/WebKitTools/Scripts/print-vse-failure-logs
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+# Copyright (c) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# 
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# This is a very simple script designed to crawl the build directory
+# for visual studio express build logs and print them to stdout.
+
+from __future__ import with_statement
+
+import codecs
+import os.path
+import os
+
+from webkitpy.common.system.executive import Executive
+
+
+# This is just enough to make the win-ews bot useable.  Others who
+# actually use Windows should feel encouraged to improve this class,
+# including just printing the text instead of the raw html.
+class PrintVisualStudioExpressLogs(object):
+    def __init__(self):
+        self._executive = Executive()
+
+    def _find_buildlogs(self, build_directory):
+        build_log_paths = []
+        # FIXME: Walking the obj/ root under the build directory might be faster.
+        for dirpath, dirnames, filenames in os.walk(build_directory):
+            for file_name in filenames:
+                if file_name == "BuildLog.htm":
+                    file_path = os.path.join(dirpath, file_name)
+                    build_log_paths.append(file_path)
+        return build_log_paths
+
+    def main(self):
+        # FIXME: ports/webkit.py should provide the build directory in a nice API.
+        build_directory = self._executive.run_command(["webkit-build-directory", "--configuration"]).rstrip()
+        build_log_paths = self._find_buildlogs(build_directory)
+
+        print "Found %s Visual Studio Express Build Logs:%s" % (len(build_log_paths), "\n".join(build_log_paths))
+
+        for build_log_path in build_log_paths:
+            print "%s:\n" % build_log_path
+            with codecs.open(build_log_path, "r", "utf-16") as build_log:
+                print build_log.read()
+
+
+if __name__ == '__main__':
+    PrintVisualStudioExpressLogs().main()
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index fa85667..2c1d8da 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -1186,6 +1186,12 @@ sub buildXCodeProject($$@)
     return system "xcodebuild", "-project", "$project.xcodeproj", @extraOptions;
 }
 
+sub usingVisualStudioExpress()
+{
+    determineConfigurationForVisualStudio();
+    return $willUseVCExpressWhenBuilding;
+}
+
 sub buildVisualStudioProject
 {
     my ($project, $clean) = @_;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list