Bug 69121

Summary: run-api-tests fails on chromium-win bot
Product: WebKit Reporter: Xianzhu Wang <wangxianzhu>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, rniwa, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch (fixed a grammar error in help message)
abarth: review-
patch v3 none

Description Xianzhu Wang 2011-09-29 19:24:11 PDT
The log shows:

Running build-api-tests
'Tools\Scripts\build-api-tests' is not recognized as an internal or external command,
operable program or batch file.
Compiling TestWebKitAPI failed!

I guess we can't execute 'Tools\Scripts\build-api-tests' (with chdirWebKit()) directly from a perl script on Windows, but must execute with with 'perl ...'.
Comment 1 Xianzhu Wang 2011-09-29 19:39:54 PDT
Created attachment 109242 [details]
patch
Comment 2 Xianzhu Wang 2011-09-29 19:44:11 PDT
Created attachment 109244 [details]
patch (fixed a grammar error in help message)
Comment 3 Adam Barth 2011-09-29 20:23:06 PDT
Comment on attachment 109244 [details]
patch (fixed a grammar error in help message)

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

> Tools/Scripts/run-api-tests:68
> +  --[no-]build          Build (or do not build) unit tests prior to running (default: $buildDefault. No use for Chromium as buile-webkit builds everything)

Not used for Chromium because build-webkit builds everything

Actually, I'd skip this part of the change.

> Tools/Scripts/run-api-tests:85
> -buildTestTool() if $build;
> +buildTestTool() if $build && !isChromium();

I'd also skip this part.

> Tools/Scripts/run-api-tests:285
> -    my $buildProcess = open3($childIn, $childOut, $childErr, $pathToBuildTestTool, @args) or die "Failed to run " . $buildTestTool;
> +    my $buildProcess = open3($childIn, $childOut, $childErr, "perl", $pathToBuildTestTool, @args) or die "Failed to run " . $buildTestTool;

This is the only part that's needed.

Are you sure you don't need to put $pathToBuildTestTool into @args?  I'm somewhat of a Perl novice.  :)
Comment 4 Xianzhu Wang 2011-09-29 20:52:52 PDT
Comment on attachment 109244 [details]
patch (fixed a grammar error in help message)

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

>> Tools/Scripts/run-api-tests:68
>> +  --[no-]build          Build (or do not build) unit tests prior to running (default: $buildDefault. No use for Chromium as buile-webkit builds everything)
> 
> Not used for Chromium because build-webkit builds everything
> 
> Actually, I'd skip this part of the change.

Done.

>> Tools/Scripts/run-api-tests:85
>> +buildTestTool() if $build && !isChromium();
> 
> I'd also skip this part.

Done.

>> Tools/Scripts/run-api-tests:285
>> +    my $buildProcess = open3($childIn, $childOut, $childErr, "perl", $pathToBuildTestTool, @args) or die "Failed to run " . $buildTestTool;
> 
> This is the only part that's needed.
> 
> Are you sure you don't need to put $pathToBuildTestTool into @args?  I'm somewhat of a Perl novice.  :)

I saw the same usage in old-run-webkit-tests (line 1444), and it works at least on Linux. I'm Perl novice too :)
Comment 5 Xianzhu Wang 2011-09-29 20:53:02 PDT
Created attachment 109249 [details]
patch v3
Comment 6 Adam Barth 2011-09-29 21:01:21 PDT
Comment on attachment 109249 [details]
patch v3

Thanks!
Comment 7 WebKit Review Bot 2011-09-29 22:04:58 PDT
Comment on attachment 109249 [details]
patch v3

Clearing flags on attachment: 109249

Committed r96388: <http://trac.webkit.org/changeset/96388>
Comment 8 WebKit Review Bot 2011-09-29 22:05:03 PDT
All reviewed patches have been landed.  Closing bug.