Bug 29544 - Make sunspider script work on Windows platform
Summary: Make sunspider script work on Windows platform
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-21 07:11 PDT by Csaba Osztrogonác
Modified: 2009-09-30 01:13 PDT (History)
3 users (show)

See Also:


Attachments
proposed patch (1.44 KB, patch)
2009-09-21 07:17 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
proposed patch (1.49 KB, patch)
2009-09-21 07:21 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
proposed patch (1.14 KB, patch)
2009-09-21 08:33 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
proposed patch (1.17 KB, patch)
2009-09-28 03:49 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2009-09-21 07:11:57 PDT
On Windows there isn't /dev/null device. Instead of this, we should use NUL device.

Windows hasn't grep.exe by default. To make sunspider script work, you should install grep.exe eg from UnxUtils.
I don't find any reason why grep is necessary in sunspider script. If it is really unnecessary, we should remove it,
and the script will work on Windows too without installing grep.exe .
Comment 1 Csaba Osztrogonác 2009-09-21 07:16:09 PDT
"grep -v break" added by Maciej, accordingly I added you to cc.
Could you tell me why it is necessary? I don't find any "break" in jsc output.

http://trac.webkit.org/changeset/26915
Comment 2 Csaba Osztrogonác 2009-09-21 07:17:05 PDT
Created attachment 39849 [details]
proposed patch
Comment 3 Csaba Osztrogonác 2009-09-21 07:21:52 PDT
Created attachment 39850 [details]
proposed patch

sorry, I forgot adding bug to the ChangeLog
Comment 4 Csaba Osztrogonác 2009-09-21 08:33:36 PDT
Created attachment 39852 [details]
proposed patch

Here is the new proposed patch, because grep should be necessary for sunspider-compare-result script.

I'll try to find the function of this grep, and if I am convinced it is really unnecessary, I'll submit new patch to remove it.
Comment 5 Maciej Stachowiak 2009-09-21 08:37:40 PDT
Comment on attachment 39852 [details]
proposed patch

r=me
Comment 6 Zoltan Horvath 2009-09-21 08:57:20 PDT
attachment 39852 [details] landed in: http://trac.webkit.org/changeset/48584
Comment 7 Eric Seidel (no email) 2009-09-21 14:08:01 PDT
Comment on attachment 39852 [details]
proposed patch

Csaba isn't a committer, so I assume he (she?) wanted this automatted commit.  You can opt in/out of auto-commit in the future using "commit-queue?" or "commit-queue-"
Comment 8 WebKit Commit Bot 2009-09-21 14:08:38 PDT
Comment on attachment 39852 [details]
proposed patch

Rejecting patch 39852 from commit-queue.

Patch https://bugs.webkit.org/attachment.cgi?id=39852 from bug 29544 failed to download and apply.
Comment 9 Csaba Osztrogonác 2009-09-21 14:15:57 PDT
(In reply to comment #7)
> (From update of attachment 39852 [details])
> Csaba isn't a committer, so I assume he (she?) wanted this automatted commit. 
> You can opt in/out of auto-commit in the future using "commit-queue?" or
> "commit-queue-"

I asked Zoltan to commit this patch, he is our committer, and he done it.
Should we have removed r+ flag after landing?

I would like to leave open this bug, because it might need one more patch.
Comment 10 Csaba Osztrogonác 2009-09-28 03:49:06 PDT
Created attachment 40224 [details]
proposed patch

I've found a nicer and platorm independent solution for null device problem.
Comment 11 Zoltan Horvath 2009-09-30 00:55:56 PDT
Comment on attachment 40224 [details]
proposed patch

> diff --git a/SunSpider/ChangeLog b/SunSpider/ChangeLog
> index e121eeb..8aa63bf 100644
> --- a/SunSpider/ChangeLog
> +++ b/SunSpider/ChangeLog
> @@ -1,3 +1,12 @@
> +2009-09-28  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Platform specific null device replaced with a platform independent.
> +        https://bugs.webkit.org/show_bug.cgi?id=29544
> +
> +        * sunspider: Using File::Spec->devnull() instead of /dev/null and NUL.
> +
>  2009-09-21  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
>  
>          Reviewed by Maciej Stachowiak.
> diff --git a/SunSpider/sunspider b/SunSpider/sunspider
> index 7825a63..20614b1 100755
> --- a/SunSpider/sunspider
> +++ b/SunSpider/sunspider
> @@ -160,8 +160,7 @@ sub writePrefixFile()
>  sub runTestsOnce($)
>  {
>      my ($useShark) = @_;
> -    my $nullDevice = ($^O eq "MSWin32") ? "NUL" : "/dev/null";
> -    my $shellArgs = $jsShellArgs . " -f $prefixFile -f resources/sunspider-standalone-driver.js 2> " . $nullDevice;
> +    my $shellArgs = $jsShellArgs . " -f $prefixFile -f resources/sunspider-standalone-driver.js 2> " . File::Spec->devnull();
>      my $output;
>      if ($useShark) {
>          my $intervalArg = $useShark == 20 ? "-I 20u" : "";
Comment 12 WebKit Commit Bot 2009-09-30 01:13:10 PDT
Comment on attachment 40224 [details]
proposed patch

Clearing flags on attachment: 40224

Committed r48923: <http://trac.webkit.org/changeset/48923>
Comment 13 WebKit Commit Bot 2009-09-30 01:13:14 PDT
All reviewed patches have been landed.  Closing bug.