summaryrefslogtreecommitdiffstats
path: root/SunSpider
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-09-29 17:32:26 +0100
committerSteve Block <steveblock@google.com>2010-09-29 17:35:08 +0100
commit68513a70bcd92384395513322f1b801e7bf9c729 (patch)
tree161b50f75a5921d61731bb25e730005994fcec85 /SunSpider
parentfd5c6425ce58eb75211be7718d5dee960842a37e (diff)
downloadexternal_webkit-68513a70bcd92384395513322f1b801e7bf9c729.zip
external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.gz
external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.bz2
Merge WebKit at r67908: Initial merge by Git
Change-Id: I43a553e7b3299b28cb6ee8aa035ed70fe342b972
Diffstat (limited to 'SunSpider')
-rw-r--r--SunSpider/ChangeLog16
-rw-r--r--SunSpider/resources/sunspider-standalone-driver.js7
-rwxr-xr-xSunSpider/sunspider7
3 files changed, 27 insertions, 3 deletions
diff --git a/SunSpider/ChangeLog b/SunSpider/ChangeLog
index faa3002..279a389 100644
--- a/SunSpider/ChangeLog
+++ b/SunSpider/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-16 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Mark Rowe.
+ https://bugs.webkit.org/show_bug.cgi?id=45924
+
+ Modify the SunSpider harness to allow a path to be passed to the --suite
+ argument, supress the normal prepend-"tests/" behaviour for suite names
+ containing a '/'.
+
+ Also wrap the code in an anonymous function to move variables out of global
+ scope (currently the harness cannot handle running tests the overwrite the
+ variable 'j').
+
+ * resources/sunspider-standalone-driver.js:
+ * sunspider:
+
2010-08-27 Michael Saboff <msaboff@apple.com>
Reviewed by Stephanie Lewis.
diff --git a/SunSpider/resources/sunspider-standalone-driver.js b/SunSpider/resources/sunspider-standalone-driver.js
index 3a8a3e9..a015822 100644
--- a/SunSpider/resources/sunspider-standalone-driver.js
+++ b/SunSpider/resources/sunspider-standalone-driver.js
@@ -25,12 +25,14 @@
var results = new Array();
+(function(){
+
var time = 0;
var times = [];
times.length = tests.length;
for (var j = 0; j < tests.length; j++) {
- var testName = "tests/" + suiteName + "/" + tests[j] + ".js";
+ var testName = suitePath + "/" + tests[j] + ".js";
var startTime = new Date;
if (testName.indexOf('parse-only') >= 0)
checkSyntax(testName);
@@ -54,3 +56,6 @@ function recordResults(tests, times)
}
recordResults(tests, times);
+
+})();
+
diff --git a/SunSpider/sunspider b/SunSpider/sunspider
index dedc88f..dbe26cd 100755
--- a/SunSpider/sunspider
+++ b/SunSpider/sunspider
@@ -86,6 +86,9 @@ $suite = "sunspider-0.9.1" if (!$suite);
my $resultDirectory = "${suite}-results";
+my $suitePath = $suite;
+$suitePath = "tests/" . $suitePath unless ($suite =~ /\//);
+
$runShark = 1 if $runSharkCache;
$runShark = 20 if $runShark20;
$testRuns = 1 if $runShark;
@@ -129,7 +132,7 @@ my %uniqueCategories = ();
sub loadTestsList()
{
- open TESTLIST, "<", "tests/${suite}/LIST" or die "Can't find ./tests/${suite}/LIST";
+ open TESTLIST, "<", "${suitePath}/LIST" or die "Can't find ${suitePath}/LIST";
while (<TESTLIST>) {
chomp;
next unless !$testsPattern || /$testsPattern/;
@@ -151,7 +154,7 @@ my $resultsFile = "$resultDirectory/sunspider-results-$timeString.js";
sub writePrefixFile()
{
- my $prefix = "var suiteName = " . '"' . $suite . '"' . ";\n";
+ my $prefix = "var suitePath = " . '"' . $suitePath . '"' . ";\n";
$prefix .= "var tests = [ " . join(", ", map { '"' . $_ . '"' } @tests) . " ];\n";
$prefix .= "var categories = [ " . join(", ", map { '"' . $_ . '"' } @categories) . " ];\n";