Commit 160ead62 authored by eric@webkit.org's avatar eric@webkit.org

2010-01-24 Eric Seidel <eric@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: svn://svn.chromium.org/blink/trunk@53783 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 396dc4c0
2010-01-24 Eric Seidel <eric@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@webkit.org> 2010-01-24 Adam Barth <abarth@webkit.org>
Rubber stamped by Eric Seidel. Rubber stamped by Eric Seidel.
......
...@@ -87,7 +87,7 @@ sub expectedDirectoryForTest($;$;$); ...@@ -87,7 +87,7 @@ sub expectedDirectoryForTest($;$;$);
sub fileNameWithNumber($$); sub fileNameWithNumber($$);
sub htmlForResultsSection(\@$&); sub htmlForResultsSection(\@$&);
sub isTextOnlyTest($); sub isTextOnlyTest($);
sub launchWithEnv(\@\%); sub launchWithCurrentEnv(@);
sub resolveAndMakeTestResultsDirectory(); sub resolveAndMakeTestResultsDirectory();
sub numericcmp($$); sub numericcmp($$);
sub openDiffTool(); sub openDiffTool();
...@@ -659,7 +659,7 @@ for my $test (@tests) { ...@@ -659,7 +659,7 @@ for my $test (@tests) {
} else { } else {
$testPath = canonpath($testPath); $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. # DumpRenderTree is expected to dump two "blocks" to stdout for each test.
...@@ -1027,10 +1027,6 @@ if (isGtk()) { ...@@ -1027,10 +1027,6 @@ if (isGtk()) {
system "WebKitTools/Scripts/run-launcher", @configurationArgs, "file://".$testResults if $launchSafari; system "WebKitTools/Scripts/run-launcher", @configurationArgs, "file://".$testResults if $launchSafari;
} elsif (isQt()) { } elsif (isQt()) {
unshift @configurationArgs, qw(-graphicssystem raster -style windows); 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; system "WebKitTools/Scripts/run-launcher", @configurationArgs, "file://".$testResults if $launchSafari;
} elsif (isCygwin()) { } elsif (isCygwin()) {
system "cygstart", $testResults if $launchSafari; system "cygstart", $testResults if $launchSafari;
...@@ -1214,20 +1210,20 @@ sub slowestcmp($$) ...@@ -1214,20 +1210,20 @@ sub slowestcmp($$)
return pathcmp($testa, $testb); 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. # 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->Indent(0);
$environmentDumper->Purity(1); $environmentDumper->Purity(1);
my $allEnvVars = $environmentDumper->Dump(); my $allEnvVars = $environmentDumper->Dump();
unshift @{$args}, "\"$allEnvVars\""; unshift @args, "\"$allEnvVars\"";
my $execScript = File::Spec->catfile(sourceDir(), qw(WebKitTools Scripts execAppWithEnv)); my $execScript = File::Spec->catfile(sourceDir(), qw(WebKitTools Scripts execAppWithEnv));
unshift @{$args}, $execScript; unshift @args, $execScript;
return @{$args}; return @args;
} }
sub resolveAndMakeTestResultsDirectory() sub resolveAndMakeTestResultsDirectory()
...@@ -1242,9 +1238,10 @@ sub openDiffTool() ...@@ -1242,9 +1238,10 @@ sub openDiffTool()
return if $isDiffToolOpen; return if $isDiffToolOpen;
return if !$pixelTests; return if !$pixelTests;
my %CLEAN_ENV; local %ENV;
$CLEAN_ENV{MallocStackLogging} = 1 if $shouldCheckLeaks; $ENV{MallocStackLogging} = 1 if $shouldCheckLeaks;
$imageDiffToolPID = open2(\*DIFFIN, \*DIFFOUT, $imageDiffTool, launchWithEnv(@diffToolArgs, %CLEAN_ENV)) or die "unable to open $imageDiffTool\n"; $imageDiffToolPID = open2(\*DIFFIN, \*DIFFOUT, $imageDiffTool, launchWithCurrentEnv(@diffToolArgs)) or die "unable to open $imageDiffTool\n";
$ENV{MallocStackLogging} = 0 if $shouldCheckLeaks;
$isDiffToolOpen = 1; $isDiffToolOpen = 1;
} }
...@@ -1252,52 +1249,56 @@ sub openDumpTool() ...@@ -1252,52 +1249,56 @@ sub openDumpTool()
{ {
return if $isDumpToolOpen; return if $isDumpToolOpen;
my %CLEAN_ENV; # Save environment variables required for the linux environment.
my $homeDir = $ENV{'HOME'};
# Generic environment variables my $libraryPath = $ENV{'LD_LIBRARY_PATH'};
$CLEAN_ENV{XML_CATALOG_FILES} = ""; # work around missing /etc/catalog <rdar://problem/4292995> my $dyldLibraryPath = $ENV{'DYLD_LIBRARY_PATH'};
my $dbusAddress = $ENV{'DBUS_SESSION_BUS_ADDRESS'};
# Platform spesifics my $display = $ENV{'DISPLAY'};
if (isLinux()) { my $xauthority = $ENV{'XAUTHORITY'};
if (defined $ENV{'DISPLAY'}) { my $testfonts = $ENV{'WEBKIT_TESTFONTS'};
$CLEAN_ENV{DISPLAY} = $ENV{'DISPLAY'};
my $homeDrive = $ENV{'HOMEDRIVE'};
my $homePath = $ENV{'HOMEPATH'};
local %ENV;
if (isQt() || isGtk()) {
if (defined $display) {
$ENV{DISPLAY} = $display;
} else { } else {
$CLEAN_ENV{DISPLAY} = ":1"; $ENV{DISPLAY} = ":1";
} }
if (defined $ENV{'XAUTHORITY'}) { if (defined $xauthority) {
$CLEAN_ENV{XAUTHORITY} = $ENV{'XAUTHORITY'}; $ENV{XAUTHORITY} = $xauthority;
}
if (defined $ENV{'WEBKIT_TESTFONTS'}) {
$CLEAN_ENV{WEBKIT_TESTFONTS} = $ENV{'WEBKIT_TESTFONTS'};
} }
$ENV{'WEBKIT_TESTFONTS'} = $testfonts if defined($testfonts);
$CLEAN_ENV{HOME} = $ENV{'HOME'}; $ENV{HOME} = $homeDir;
if (defined $ENV{'LD_LIBRARY_PATH'}) { if (defined $libraryPath) {
$CLEAN_ENV{LD_LIBRARY_PATH} = $ENV{'LD_LIBRARY_PATH'}; $ENV{LD_LIBRARY_PATH} = $libraryPath;
} }
if (defined $ENV{'DBUS_SESSION_BUS_ADDRESS'}) { if (defined $dyldLibraryPath) {
$CLEAN_ENV{DBUS_SESSION_BUS_ADDRESS} = $ENV{'DBUS_SESSION_BUS_ADDRESS'}; $ENV{DYLD_LIBRARY_PATH} = $dyldLibraryPath;
} }
} elsif (isDarwin()) { if (defined $dbusAddress) {
if (defined $ENV{'DYLD_LIBRARY_PATH'}) { $ENV{DBUS_SESSION_BUS_ADDRESS} = $dbusAddress;
$CLEAN_ENV{DYLD_LIBRARY_PATH} = $ENV{'DYLD_LIBRARY_PATH'};
} }
$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()) { 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); my @args = ($dumpTool, @toolArgs);
if (isAppleMacWebKit() and !isTiger()) { if (isAppleMacWebKit() and !isTiger()) {
unshift @args, "arch", "-" . architecture(); unshift @args, "arch", "-" . architecture();
...@@ -1306,15 +1307,10 @@ sub openDumpTool() ...@@ -1306,15 +1307,10 @@ sub openDumpTool()
if ($useValgrind) { if ($useValgrind) {
unshift @args, "valgrind", "--suppressions=$platformBaseDirectory/qt/SuppressedValgrindErrors"; unshift @args, "valgrind", "--suppressions=$platformBaseDirectory/qt/SuppressedValgrindErrors";
} }
$CLEAN_ENV{MallocStackLogging} = 1 if $shouldCheckLeaks; $ENV{MallocStackLogging} = 1 if $shouldCheckLeaks;
$dumpToolPID = open3(\*OUT, \*IN, \*ERROR, launchWithCurrentEnv(@args)) or die "Failed to start tool: $dumpTool\n";
$dumpToolPID = open3(\*OUT, \*IN, \*ERROR, launchWithEnv(@args, %CLEAN_ENV)) or die "Failed to start tool: $dumpTool\n"; $ENV{MallocStackLogging} = 0 if $shouldCheckLeaks;
if (isCygwin()) {
# Convert '\r\n' => '\n', to match the expected files
binmode(IN, ":crlf");
binmode(ERROR, ":crlf");
}
$isDumpToolOpen = 1; $isDumpToolOpen = 1;
$dumpToolCrashed = 0; $dumpToolCrashed = 0;
} }
...@@ -1341,6 +1337,7 @@ sub dumpToolDidCrash() ...@@ -1341,6 +1337,7 @@ sub dumpToolDidCrash()
{ {
return 1 if $dumpToolCrashed; return 1 if $dumpToolCrashed;
return 0 unless $isDumpToolOpen; return 0 unless $isDumpToolOpen;
my $pid = waitpid(-1, WNOHANG); my $pid = waitpid(-1, WNOHANG);
return 1 if ($pid == $dumpToolPID); return 1 if ($pid == $dumpToolPID);
...@@ -1620,8 +1617,7 @@ sub convertPathUsingCygpath($$) ...@@ -1620,8 +1617,7 @@ sub convertPathUsingCygpath($$)
local *inFH = $cygpath->{"in"}; local *inFH = $cygpath->{"in"};
local *outFH = $cygpath->{"out"}; local *outFH = $cygpath->{"out"};
print outFH $path . "\n"; print outFH $path . "\n";
my $convertedPath = <inFH>; chomp(my $convertedPath = <inFH>);
chomp($convertedPath) if defined $convertedPath;
return $convertedPath; return $convertedPath;
} }
......
...@@ -541,10 +541,9 @@ sub builtDylibPathForName ...@@ -541,10 +541,9 @@ sub builtDylibPathForName
if (isDarwin() and -d "$configurationProductDir/lib/$libraryName.framework") { if (isDarwin() and -d "$configurationProductDir/lib/$libraryName.framework") {
return "$configurationProductDir/lib/$libraryName.framework/$libraryName"; return "$configurationProductDir/lib/$libraryName.framework/$libraryName";
} elsif (isWindows()) { } elsif (isWindows()) {
my $mkspec = `qmake -query QMAKE_MKSPECS`; chomp(my $mkspec = `qmake -query QMAKE_MKSPECS`);
$mkspec =~ s/[\n|\r]$//g;
my $qtMajorVersion = retrieveQMakespecVar("$mkspec/qconfig.pri", "QT_MAJOR_VERSION"); my $qtMajorVersion = retrieveQMakespecVar("$mkspec/qconfig.pri", "QT_MAJOR_VERSION");
if (not $qtMajorVersion) { if ($qtMajorVersion eq "unknown") {
$qtMajorVersion = ""; $qtMajorVersion = "";
} }
return "$configurationProductDir/lib/$libraryName$qtMajorVersion.dll"; return "$configurationProductDir/lib/$libraryName$qtMajorVersion.dll";
...@@ -1329,11 +1328,11 @@ sub retrieveQMakespecVar ...@@ -1329,11 +1328,11 @@ sub retrieveQMakespecVar
my $mkspec = $_[0]; my $mkspec = $_[0];
my $varname = $_[1]; my $varname = $_[1];
my $varvalue = undef; my $compiler = "unknown";
#print "retrieveMakespecVar " . $mkspec . ", " . $varname . "\n"; #print "retrieveMakespecVar " . $mkspec . ", " . $varname . "\n";
local *SPEC; local *SPEC;
open SPEC, "<$mkspec" or return $varvalue; open SPEC, "<$mkspec" or return "make";
while (<SPEC>) { while (<SPEC>) {
if ($_ =~ /\s*include\((.+)\)/) { if ($_ =~ /\s*include\((.+)\)/) {
# open the included mkspec # open the included mkspec
...@@ -1341,15 +1340,15 @@ sub retrieveQMakespecVar ...@@ -1341,15 +1340,15 @@ sub retrieveQMakespecVar
(my $volume, my $directories, my $file) = File::Spec->splitpath($mkspec); (my $volume, my $directories, my $file) = File::Spec->splitpath($mkspec);
my $newcwd = "$volume$directories"; my $newcwd = "$volume$directories";
chdir $newcwd if $newcwd; chdir $newcwd if $newcwd;
$varvalue = retrieveQMakespecVar($1, $varname); $compiler = retrieveQMakespecVar($1, $varname);
chdir $oldcwd; chdir $oldcwd;
} elsif ($_ =~ /$varname\s*=\s*([^\s]+)/) { } elsif ($_ =~ /$varname\s*=\s*([^\s]+)/) {
$varvalue = $1; $compiler = $1;
last; last;
} }
} }
close SPEC; close SPEC;
return $varvalue; return $compiler;
} }
sub qtMakeCommand($) sub qtMakeCommand($)
...@@ -1646,13 +1645,9 @@ sub setPathForRunningWebKitApp ...@@ -1646,13 +1645,9 @@ sub setPathForRunningWebKitApp
{ {
my ($env) = @_; my ($env) = @_;
if (isAppleWinWebKit()) { return unless isAppleWinWebKit();
$env->{PATH} = join(':', productDir(), dirname(installedSafariPath()), appleApplicationSupportPath(), $env->{PATH} || "");
} elsif (isQt()) { $env->{PATH} = join(':', productDir(), dirname(installedSafariPath()), appleApplicationSupportPath(), $env->{PATH} || "");
my $qtLibs = `qmake -query QT_INSTALL_LIBS`;
$qtLibs =~ s/[\n|\r]$//g;
$env->{PATH} = join(';', $qtLibs, productDir() . "/lib", $env->{PATH} || "");
}
} }
sub runSafari sub runSafari
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment