Commit 71de81e7 authored by slewis@apple.com's avatar slewis@apple.com

2008-05-19 Stephanie Lewis <slewis@apple.com>


        Explicitly set run mode to 32bit unless overridden to avoid
        confusion when running tests

        * Scripts/build-dumprendertree:
        * Scripts/gdb-safari:
        * Scripts/run-webkit-tests:
        * Scripts/webkitdirs.pm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3ddd9465
2008-05-19 Stephanie Lewis <slewis@apple.com>
Reviewed by NOBODY (OOPS!).
Explicitly set run mode to 32bit unless overridden to avoid
confusion when running tests
* Scripts/build-dumprendertree:
* Scripts/gdb-safari:
* Scripts/run-webkit-tests:
* Scripts/webkitdirs.pm:
2008-05-16 Stephanie Lewis <slewis@apple.com>
Reviewed by Steve.
......
......@@ -42,7 +42,7 @@ my @options = XcodeOptions();
chdir "WebKitTools/DumpRenderTree" or die;
my $result;
if (isOSX()) {
$result = system "xcodebuild", "-project", "DumpRenderTree.xcodeproj", @options;
$result = system "xcodebuild", "-project", "DumpRenderTree.xcodeproj", @options, @ARGV;
} elsif (isCygwin()) {
$result = buildVisualStudioProject("DumpRenderTree.sln");
} elsif (isQt() || isGtk()) {
......
......@@ -46,12 +46,16 @@ die "Can't find gdb executable. Is gdb installed?\n" unless -x $gdbPath;
# Check to see that all the frameworks are built.
checkFrameworks();
my $archprefs = `arch`;
chomp $archprefs;
# Put a command to set DYLD_FRAMEWORK_PATH in a temp file.
# Also set WEBKIT_UNSET_DYLD_FRAMEWORK_PATH to YES in this environment, so that
# executables launched by Safari don't inherit using the new frameworks.
my ($fh, $path) = mkstemp("/tmp/gdb-safari-XXXX");
print $fh "set env DYLD_FRAMEWORK_PATH $productDir\n";
print $fh "set env WEBKIT_UNSET_DYLD_FRAMEWORK_PATH YES\n";
print $fh "set architecture $archprefs\n";
# Start up Safari.
print "Start Safari under gdb with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
......
......@@ -133,6 +133,7 @@ my $reverseTests = 0;
my $randomizeTests = 0;
my $mergeDepth;
my @leaksFilenames;
my $run64bit = 0;
# Default to --no-http for Qt, Gtk and wx for now.
$testHTTP = 0 if (isGtk() || isWx());
......@@ -201,6 +202,7 @@ Usage: $programName [options] [testdir|testpath ...]
--valgrind Run DumpRenderTree inside valgrind (Qt/Linux only)
-v|--verbose More verbose output (overrides --quiet)
-m|--merge-leak-depth arg Merges leak callStacks and prints the number of unique leaks beneath a callstack depth of arg. Defaults to 5.
--64-bit run in 64bit mode
EOF
# Process @ARGV for configuration switches before calling GetOptions()
......@@ -238,6 +240,7 @@ my $getOptionsResult = GetOptions(
'root=s' => \$root,
'add-platform-exceptions' => \$addPlatformExceptions,
'merge-leak-depth|m:5' => \$mergeDepth,
'64-bit' => \$run64bit
);
if (!$getOptionsResult || $showHelp) {
......@@ -271,6 +274,7 @@ $testMedia = 0 if $shouldCheckLeaks && isTiger();
setConfigurationProductDir(Cwd::abs_path($root)) if (defined($root));
my $productDir = productDir();
$productDir .= "/bin" if (isQt());
setArchs($run64bit);
if (isGtk()) {
if (useQmake()) {
......@@ -289,6 +293,13 @@ if(!defined($root)){
push(@args, "--qt") if isQt();
push(@args, "--gtk") if isGtk();
if ($run64bit) {
my $archPrefs = `arch`;
chomp $archPrefs;
push(@args, "ARCHS=i386 x86_64") if $archPrefs =~ /i386/;
push(@args, "ARCHS=ppc ppc64") if $archPrefs =~ /ppc/;
}
my $buildResult = system "WebKitTools/Scripts/build-dumprendertree", @args;
if ($buildResult) {
print STDERR "Compiling DumpRenderTree failed!\n";
......@@ -1180,16 +1191,19 @@ sub openDumpTool()
}
setPathForRunningWebKitApp(\%ENV) if isCygwin();
}
my @args = ();
if ($useValgrind) {
push @args, $dumpTool;
setArchs($run64bit);
my @args = @toolArgs;
unshift @args, $dumpTool;
if (isOSX) {
unshift @args, "arch";
}
push @args, @toolArgs;
if ($useValgrind) {
$dumpTool = "valgrind";
}
$dumpToolPID = open3(\*OUT, \*IN, \*ERROR, $dumpTool, @args) or die "Failed to start tool: $dumpTool\n";
unshift @args, "valgrind";
}
$dumpToolPID = open3(\*OUT, \*IN, \*ERROR, @args) or die "Failed to start tool: $dumpTool\n";
$isDumpToolOpen = 1;
$dumpToolCrashed = 0;
}
......
......@@ -56,6 +56,7 @@ my $osXVersion;
my $isQt;
my $isGtk;
my $isWx;
my $run64bit;
# Variables for Win32 support
my $vcBuildPath;
......@@ -894,7 +895,8 @@ sub runSafari
print "Starting Safari with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
$ENV{DYLD_FRAMEWORK_PATH} = $productDir;
$ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = "YES";
return system safariPath(), @ARGV;
setArchs($run64bit);
return system "arch", safariPath(), @ARGV;
}
if (isCygwin()) {
......@@ -914,4 +916,13 @@ sub runSafari
return 1;
}
sub setArchs($)
{
my ($run64bitFlag) = @_;
if (isOSX()) {
$ENV{ARCHPREFERENCE} = "i386,ppc";
$ENV{ARCHPREFERENCE} = "x86_64,ppc64,i386,ppc" if $run64bit;
}
}
1;
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