Bug 63954

Summary: run-api-tests output is very confusing on Windows
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Tools / TestsAssignee: Adam Roben (:aroben) <aroben>
Status: RESOLVED FIXED    
Severity: Normal CC: dbates, ddkilzer, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch dbates: review+

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>