Bug 63954 - run-api-tests output is very confusing on Windows
Summary: run-api-tests output is very confusing on Windows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Roben (:aroben)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-05 14:24 PDT by Adam Roben (:aroben)
Modified: 2011-07-05 15:21 PDT (History)
3 users (show)

See Also:


Attachments
Patch (8.71 KB, patch)
2011-07-05 14:25 PDT, Adam Roben (:aroben)
dbates: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-07-05 14:24:33 PDT
run-api-tests output is very confusing on Windows
Comment 1 Adam Roben (:aroben) 2011-07-05 14:25:38 PDT
Created attachment 99747 [details]
Patch
Comment 2 Daniel Bates 2011-07-05 14:39:28 PDT
Comment on attachment 99747 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=99747&action=review

> Tools/Scripts/run-api-tests:308
> +    my $suffix;
> +    if (configurationForVisualStudio() ne "Debug_All") {
> +        $suffix = "";
> +    } else {
> +        $suffix = "_debug";
> +    }

Nit: It's usually easier to think about equal than not-equal, so I would have written this as:

my $suffix;
if (configurationForVisualStudio() eq "Debug_All") {
   $suffix = "_debug";
} else {
   $suffix = "";
}

Alternatively, you could have written this as:
my $suffix = "";
$suffix = "_debug" if configurationForVisualStudio() eq "Debug_All";

> Tools/Scripts/run-api-tests:309
> +    return $path . $suffix . ".exe";

You can use string interpolation and write this as  "$path$suffix.exe".
Comment 3 Adam Roben (:aroben) 2011-07-05 15:18:55 PDT
Comment on attachment 99747 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=99747&action=review

>> Tools/Scripts/run-api-tests:308
>> +    }
> 
> Nit: It's usually easier to think about equal than not-equal, so I would have written this as:
> 
> my $suffix;
> if (configurationForVisualStudio() eq "Debug_All") {
>    $suffix = "_debug";
> } else {
>    $suffix = "";
> }
> 
> Alternatively, you could have written this as:
> my $suffix = "";
> $suffix = "_debug" if configurationForVisualStudio() eq "Debug_All";

I changed this to match your first version.

>> Tools/Scripts/run-api-tests:309
>> +    return $path . $suffix . ".exe";
> 
> You can use string interpolation and write this as  "$path$suffix.exe".

Done.
Comment 4 Adam Roben (:aroben) 2011-07-05 15:21:19 PDT
Committed r90408: <http://trac.webkit.org/changeset/90408>