diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebKitTools/Scripts/run-javascriptcore-tests | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebKitTools/Scripts/run-javascriptcore-tests')
-rwxr-xr-x | WebKitTools/Scripts/run-javascriptcore-tests | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/WebKitTools/Scripts/run-javascriptcore-tests b/WebKitTools/Scripts/run-javascriptcore-tests index b47d630..afd0ab4 100755 --- a/WebKitTools/Scripts/run-javascriptcore-tests +++ b/WebKitTools/Scripts/run-javascriptcore-tests @@ -56,16 +56,20 @@ $configuration = configuration(); my @jsArgs; my @xcodeArgs; my $root; +my $run64Bit; # pre-evaluate arguments. jsDriver args have - preceding, xcode args do not. # special arguments # --root=<path to webkit root> use pre-built root # --gtk build gtk +# --no-64-bit or --64-bit foreach my $arg(@ARGV) { print $arg."\n"; if( $arg =~ /root=(.*)/ ){ $root = $1; } elsif( $arg =~ /^--gtk$/i || $arg =~ /^--qt$/i || $arg =~ /^--wx$/i ){ + } elsif( $arg =~ /(no-)?64-bit/ ) { + $run64Bit = !defined($1); } elsif( $arg =~ /^-/ or !($arg =~/=/)){ push( @jsArgs, $arg ); } else { @@ -75,19 +79,30 @@ foreach my $arg(@ARGV) { setConfigurationProductDir(Cwd::abs_path($root)) if (defined($root)); +if (isOSX() && !isTiger()) { + my $preferredArch = preferredArchitecture("JavaScriptCore"); + setRun64Bit($run64Bit); + my $arch = preferredArchitecture("JavaScriptCore"); + if ($arch ne $preferredArch) { + push(@jsArgs, "-a", $arch); + } +} + if(!defined($root)){ chdirWebKit(); - my @args; - push(@args, "--" . $configuration); + push(@xcodeArgs, "--" . $configuration); # FIXME: These should be stored per-config and ignored here push(@xcodeArgs, "--qt") if isQt(); push(@xcodeArgs, "--gtk") if isGtk(); push(@xcodeArgs, "--wx") if isWx(); - my $buildResult = system "perl", "WebKitTools/Scripts/build-testkjs", @xcodeArgs; + my $arch = preferredArchitecture("JavaScriptCore"); + push(@xcodeArgs, "ARCHS=$arch") if (isOSX()); + + my $buildResult = system "perl", "WebKitTools/Scripts/build-jsc", @xcodeArgs; if ($buildResult) { - print STDERR "Compiling testkjs failed!\n"; + print STDERR "Compiling jsc failed!\n"; exit exitStatus($buildResult); } } @@ -98,20 +113,20 @@ chdir("JavaScriptCore"); my $productDir = productDir(); chdir "tests/mozilla" or die; - -$productDir .= "/JavaScriptCore" if (isQt() or isGtk()); +$productDir .= "/JavaScriptCore" if isQt(); +$productDir .= "/Programs" if isGtk(); $ENV{DYLD_FRAMEWORK_PATH} = $productDir; setPathForRunningWebKitApp(\%ENV) if isCygwin(); -sub testKJSPath($) +sub jscPath($) { my ($productDir) = @_; - my $testkjsName = "testkjs"; - $testkjsName .= "_debug" if (isCygwin() && ($configuration eq "Debug")); - return "$productDir/$testkjsName"; + my $jscName = "jsc"; + $jscName .= "_debug" if (isCygwin() && ($configuration eq "Debug")); + return "$productDir/$jscName"; } -my $result = system "perl", "jsDriver.pl", "-e", "kjs", "-s", testKJSPath($productDir), "-f", "actual.html", @jsArgs; +my $result = system "perl", "jsDriver.pl", "-e", "squirrelfish", "-s", jscPath($productDir), "-f", "actual.html", @jsArgs; exit exitStatus($result) if $result; my %failures; |