Bug 15738 - a few SunSpider script improvements
Summary: a few SunSpider script improvements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Enhancement
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-28 14:33 PDT by Darin Adler
Modified: 2007-10-28 16:19 PDT (History)
0 users

See Also:


Attachments
patch (10.49 KB, patch)
2007-10-28 14:33 PDT, Darin Adler
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2007-10-28 14:33:10 PDT
I made a couple script improvements, to get ready for a mode where we can set a baseline and do automatic comparisons with the last run.
Comment 1 Darin Adler 2007-10-28 14:33:47 PDT
Created attachment 16920 [details]
patch
Comment 2 Adam Roben (:aroben) 2007-10-28 15:48:45 PDT
Comment on attachment 16920 [details]
patch

+system("$jsShellPath", "-f", $prefixFile, "-f", $resultsFile, "-f", "resources/sunspider-analyze-results.js");

You could remove the quotes from around $jsShellPath while you're at it.

+                $foundOutput = 0;
+		$foundStart = 1;
+                $result = "[{\n";

Looks like you've got some tabs here.

 	} else {
-	    if (/^[}][]]$/) {
+            print;

Did you intend to insert this print statement?

+                s/;*$//;


Do we really expect to have multiple semi-colons here?

r=me
Comment 3 Darin Adler 2007-10-28 16:19:05 PDT
(In reply to comment #2)
> +system("$jsShellPath", "-f", $prefixFile, "-f", $resultsFile, "-f",
> "resources/sunspider-analyze-results.js");
> 
> You could remove the quotes from around $jsShellPath while you're at it.

Done.

> +                $foundOutput = 0;
> +               $foundStart = 1;
> +                $result = "[{\n";
> 
> Looks like you've got some tabs here.

Hmm, the pre-existing file seems to have some tabs. Removed

>         } else {
> -           if (/^[}][]]$/) {
> +            print;
> 
> Did you intend to insert this print statement?

Oops!

> +                s/;*$//;
> 
> 
> Do we really expect to have multiple semi-colons here?

I'll switch to ? instead of *.