Bug 15738

Summary: a few SunSpider script improvements
Product: WebKit Reporter: Darin Adler <darin>
Component: Tools / TestsAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Enhancement    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
patch aroben: review+

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 *.