[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

eric at webkit.org eric at webkit.org
Thu Feb 4 21:26:43 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 072c3e50f1cceac366a4d6598e170e35c9a21742
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Jan 24 22:15:29 2010 +0000

    2010-01-24  Eric Seidel  <eric at webkit.org>
    
            No review, rolling out r53763.
            http://trac.webkit.org/changeset/53763
            https://bugs.webkit.org/show_bug.cgi?id=33895
    
            Broke 20+ tests on Windows.
    
            * Scripts/run-webkit-tests:
            * Scripts/webkitdirs.pm:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53783 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 47fceb5..c49d317 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-24  Eric Seidel  <eric at webkit.org>
+
+        No review, rolling out r53763.
+        http://trac.webkit.org/changeset/53763
+        https://bugs.webkit.org/show_bug.cgi?id=33895
+
+        Broke 20+ tests on Windows.
+
+        * Scripts/run-webkit-tests:
+        * Scripts/webkitdirs.pm:
+
 2010-01-24  Adam Barth  <abarth at webkit.org>
 
         Rubber stamped by Eric Seidel.
diff --git a/WebKitTools/Scripts/run-webkit-tests b/WebKitTools/Scripts/run-webkit-tests
index d89c703..bb4fb34 100755
--- a/WebKitTools/Scripts/run-webkit-tests
+++ b/WebKitTools/Scripts/run-webkit-tests
@@ -87,7 +87,7 @@ sub expectedDirectoryForTest($;$;$);
 sub fileNameWithNumber($$);
 sub htmlForResultsSection(\@$&);
 sub isTextOnlyTest($);
-sub launchWithEnv(\@\%);
+sub launchWithCurrentEnv(@);
 sub resolveAndMakeTestResultsDirectory();
 sub numericcmp($$);
 sub openDiffTool();
@@ -659,7 +659,7 @@ for my $test (@tests) {
         } else {
             $testPath = canonpath($testPath);
         }
-        print OUT "$testPath$suffixExpectedHash\n" if defined $testPath;
+        print OUT "$testPath$suffixExpectedHash\n";
     }
 
     # DumpRenderTree is expected to dump two "blocks" to stdout for each test.
@@ -1027,10 +1027,6 @@ if (isGtk()) {
   system "WebKitTools/Scripts/run-launcher", @configurationArgs, "file://".$testResults if $launchSafari;
 } elsif (isQt()) {
   unshift @configurationArgs, qw(-graphicssystem raster -style windows);
-  if (isCygwin()) {
-    $testResults = "/" . toWindowsPath($testResults);
-    $testResults =~ s/\\/\//g;
-  }
   system "WebKitTools/Scripts/run-launcher", @configurationArgs, "file://".$testResults if $launchSafari;
 } elsif (isCygwin()) {
   system "cygstart", $testResults if $launchSafari;
@@ -1214,20 +1210,20 @@ sub slowestcmp($$)
     return pathcmp($testa, $testb);
 }
 
-sub launchWithEnv(\@\%)
+sub launchWithCurrentEnv(@)
 {
-    my ($args, $env) = @_;
+    my (@args) = @_;
 
     # Dump the current environment as perl code and then put it in quotes so it is one parameter.
-    my $environmentDumper = Data::Dumper->new([\%{$env}], [qw(*ENV)]);
+    my $environmentDumper = Data::Dumper->new([\%ENV], [qw(*ENV)]);
     $environmentDumper->Indent(0);
     $environmentDumper->Purity(1);
     my $allEnvVars = $environmentDumper->Dump();
-    unshift @{$args}, "\"$allEnvVars\"";
+    unshift @args, "\"$allEnvVars\"";
 
     my $execScript = File::Spec->catfile(sourceDir(), qw(WebKitTools Scripts execAppWithEnv));
-    unshift @{$args}, $execScript;
-    return @{$args};
+    unshift @args, $execScript;
+    return @args;
 }
 
 sub resolveAndMakeTestResultsDirectory()
@@ -1242,9 +1238,10 @@ sub openDiffTool()
     return if $isDiffToolOpen;
     return if !$pixelTests;
 
-    my %CLEAN_ENV;
-    $CLEAN_ENV{MallocStackLogging} = 1 if $shouldCheckLeaks;
-    $imageDiffToolPID = open2(\*DIFFIN, \*DIFFOUT, $imageDiffTool, launchWithEnv(@diffToolArgs, %CLEAN_ENV)) or die "unable to open $imageDiffTool\n";
+    local %ENV;
+    $ENV{MallocStackLogging} = 1 if $shouldCheckLeaks;
+    $imageDiffToolPID = open2(\*DIFFIN, \*DIFFOUT, $imageDiffTool, launchWithCurrentEnv(@diffToolArgs)) or die "unable to open $imageDiffTool\n";
+    $ENV{MallocStackLogging} = 0 if $shouldCheckLeaks;
     $isDiffToolOpen = 1;
 }
 
@@ -1252,52 +1249,56 @@ sub openDumpTool()
 {
     return if $isDumpToolOpen;
 
-    my %CLEAN_ENV;
-
-    # Generic environment variables
-    $CLEAN_ENV{XML_CATALOG_FILES} = ""; # work around missing /etc/catalog <rdar://problem/4292995>
-
-    # Platform spesifics
-    if (isLinux()) {
-        if (defined $ENV{'DISPLAY'}) {
-            $CLEAN_ENV{DISPLAY} = $ENV{'DISPLAY'};
+    # Save environment variables required for the linux environment.
+    my $homeDir = $ENV{'HOME'};
+    my $libraryPath = $ENV{'LD_LIBRARY_PATH'};
+    my $dyldLibraryPath = $ENV{'DYLD_LIBRARY_PATH'};
+    my $dbusAddress = $ENV{'DBUS_SESSION_BUS_ADDRESS'};
+    my $display = $ENV{'DISPLAY'};
+    my $xauthority = $ENV{'XAUTHORITY'};
+    my $testfonts = $ENV{'WEBKIT_TESTFONTS'};
+
+    my $homeDrive = $ENV{'HOMEDRIVE'};
+    my $homePath = $ENV{'HOMEPATH'};
+        
+    local %ENV;
+    if (isQt() || isGtk()) {
+        if (defined $display) {
+            $ENV{DISPLAY} = $display;
         } else {
-            $CLEAN_ENV{DISPLAY} = ":1";
+            $ENV{DISPLAY} = ":1";
         }
-        if (defined $ENV{'XAUTHORITY'}) {
-            $CLEAN_ENV{XAUTHORITY} = $ENV{'XAUTHORITY'};
-        }
-
-        if (defined $ENV{'WEBKIT_TESTFONTS'}) {
-            $CLEAN_ENV{WEBKIT_TESTFONTS} = $ENV{'WEBKIT_TESTFONTS'};
+        if (defined $xauthority) {
+            $ENV{XAUTHORITY} = $xauthority;
         }
-
-        $CLEAN_ENV{HOME} = $ENV{'HOME'};
-        if (defined $ENV{'LD_LIBRARY_PATH'}) {
-            $CLEAN_ENV{LD_LIBRARY_PATH} = $ENV{'LD_LIBRARY_PATH'};
+        $ENV{'WEBKIT_TESTFONTS'} = $testfonts if defined($testfonts);
+        $ENV{HOME} = $homeDir;
+        if (defined $libraryPath) {
+            $ENV{LD_LIBRARY_PATH} = $libraryPath;
         }
-        if (defined $ENV{'DBUS_SESSION_BUS_ADDRESS'}) {
-            $CLEAN_ENV{DBUS_SESSION_BUS_ADDRESS} = $ENV{'DBUS_SESSION_BUS_ADDRESS'};
+        if (defined $dyldLibraryPath) {
+            $ENV{DYLD_LIBRARY_PATH} = $dyldLibraryPath;
         }
-    } elsif (isDarwin()) {
-        if (defined $ENV{'DYLD_LIBRARY_PATH'}) {
-            $CLEAN_ENV{DYLD_LIBRARY_PATH} = $ENV{'DYLD_LIBRARY_PATH'};
+        if (defined $dbusAddress) {
+            $ENV{DBUS_SESSION_BUS_ADDRESS} = $dbusAddress;
         }
-
-        $CLEAN_ENV{DYLD_FRAMEWORK_PATH} = $productDir;
-        $CLEAN_ENV{DYLD_INSERT_LIBRARIES} = "/usr/lib/libgmalloc.dylib" if $guardMalloc;
-    } elsif (isCygwin()) {
-        $CLEAN_ENV{HOMEDRIVE} = $ENV{'HOMEDRIVE'};
-        $CLEAN_ENV{HOMEPATH} = $ENV{'HOMEPATH'};
-
-        setPathForRunningWebKitApp(\%CLEAN_ENV);
     }
-
-    # Port spesifics
     if (isQt()) {
-        $CLEAN_ENV{QTWEBKIT_PLUGIN_PATH} = productDir() . "/lib/plugins";
+        $ENV{QTWEBKIT_PLUGIN_PATH} = productDir() . "/lib/plugins";
     }
+    $ENV{DYLD_FRAMEWORK_PATH} = $productDir;
+    $ENV{XML_CATALOG_FILES} = ""; # work around missing /etc/catalog <rdar://problem/4292995>
+    $ENV{DYLD_INSERT_LIBRARIES} = "/usr/lib/libgmalloc.dylib" if $guardMalloc;
     
+    if (isCygwin()) {
+        $ENV{HOMEDRIVE} = $homeDrive;
+        $ENV{HOMEPATH} = $homePath;
+        if ($testfonts) {
+            $ENV{WEBKIT_TESTFONTS} = $testfonts;
+        }
+        setPathForRunningWebKitApp(\%ENV) if isCygwin();
+    }
+
     my @args = ($dumpTool, @toolArgs);
     if (isAppleMacWebKit() and !isTiger()) { 
         unshift @args, "arch", "-" . architecture();             
@@ -1306,15 +1307,10 @@ sub openDumpTool()
     if ($useValgrind) {
         unshift @args, "valgrind", "--suppressions=$platformBaseDirectory/qt/SuppressedValgrindErrors";
     } 
-
-    $CLEAN_ENV{MallocStackLogging} = 1 if $shouldCheckLeaks;
-
-    $dumpToolPID = open3(\*OUT, \*IN, \*ERROR, launchWithEnv(@args, %CLEAN_ENV)) or die "Failed to start tool: $dumpTool\n";
-    if (isCygwin()) {
-        # Convert '\r\n' => '\n', to match the expected files
-        binmode(IN, ":crlf");
-        binmode(ERROR, ":crlf");
-    }
+    
+    $ENV{MallocStackLogging} = 1 if $shouldCheckLeaks;
+    $dumpToolPID = open3(\*OUT, \*IN, \*ERROR, launchWithCurrentEnv(@args)) or die "Failed to start tool: $dumpTool\n";
+    $ENV{MallocStackLogging} = 0 if $shouldCheckLeaks;
     $isDumpToolOpen = 1;
     $dumpToolCrashed = 0;
 }
@@ -1341,6 +1337,7 @@ sub dumpToolDidCrash()
 {
     return 1 if $dumpToolCrashed;
     return 0 unless $isDumpToolOpen;
+
     my $pid = waitpid(-1, WNOHANG);
     return 1 if ($pid == $dumpToolPID);
 
@@ -1620,8 +1617,7 @@ sub convertPathUsingCygpath($$)
     local *inFH = $cygpath->{"in"};
     local *outFH = $cygpath->{"out"};
     print outFH $path . "\n";
-    my $convertedPath = <inFH>;
-    chomp($convertedPath) if defined $convertedPath;
+    chomp(my $convertedPath = <inFH>);
     return $convertedPath;
 }
 
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index 8b2ecc1..d667a8a 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -541,10 +541,9 @@ sub builtDylibPathForName
         if (isDarwin() and -d "$configurationProductDir/lib/$libraryName.framework") {
             return "$configurationProductDir/lib/$libraryName.framework/$libraryName";
         } elsif (isWindows()) {
-            my $mkspec = `qmake -query QMAKE_MKSPECS`;
-            $mkspec =~ s/[\n|\r]$//g;
+            chomp(my $mkspec = `qmake -query QMAKE_MKSPECS`);
             my $qtMajorVersion = retrieveQMakespecVar("$mkspec/qconfig.pri", "QT_MAJOR_VERSION");
-            if (not $qtMajorVersion) {
+            if ($qtMajorVersion eq "unknown") {
                 $qtMajorVersion = "";
             }
             return "$configurationProductDir/lib/$libraryName$qtMajorVersion.dll";
@@ -1329,11 +1328,11 @@ sub retrieveQMakespecVar
     my $mkspec = $_[0];
     my $varname = $_[1];
 
-    my $varvalue = undef;
+    my $compiler = "unknown";
     #print "retrieveMakespecVar " . $mkspec . ", " . $varname . "\n";
 
     local *SPEC;
-    open SPEC, "<$mkspec" or return $varvalue;
+    open SPEC, "<$mkspec" or return "make";
     while (<SPEC>) {
         if ($_ =~ /\s*include\((.+)\)/) {
             # open the included mkspec
@@ -1341,15 +1340,15 @@ sub retrieveQMakespecVar
             (my $volume, my $directories, my $file) = File::Spec->splitpath($mkspec);
             my $newcwd = "$volume$directories";
             chdir $newcwd if $newcwd;
-            $varvalue = retrieveQMakespecVar($1, $varname);
+            $compiler = retrieveQMakespecVar($1, $varname);
             chdir $oldcwd;
         } elsif ($_ =~ /$varname\s*=\s*([^\s]+)/) {
-            $varvalue = $1;
+            $compiler = $1;
             last;
         }
     }
     close SPEC;
-    return $varvalue;
+    return $compiler;
 }
 
 sub qtMakeCommand($)
@@ -1646,13 +1645,9 @@ sub setPathForRunningWebKitApp
 {
     my ($env) = @_;
 
-    if (isAppleWinWebKit()) {
-        $env->{PATH} = join(':', productDir(), dirname(installedSafariPath()), appleApplicationSupportPath(), $env->{PATH} || "");
-    } elsif (isQt()) {
-        my $qtLibs = `qmake -query QT_INSTALL_LIBS`;
-        $qtLibs =~ s/[\n|\r]$//g;
-        $env->{PATH} = join(';', $qtLibs, productDir() . "/lib", $env->{PATH} || "");
-    }
+    return unless isAppleWinWebKit();
+
+    $env->{PATH} = join(':', productDir(), dirname(installedSafariPath()), appleApplicationSupportPath(), $env->{PATH} || "");
 }
 
 sub runSafari

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list