Bug 68680

Summary: Let TestWebKitAPI and webkit_unit_tests work for chromium-win
Product: WebKit Reporter: Xianzhu Wang <wangxianzhu>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 68678    
Attachments:
Description Flags
patch
tony: review-, tony: commit-queue-
patch v2 none

Description Xianzhu Wang 2011-09-23 00:07:31 PDT
Bug 67756 and bug 68206 let TestWebKitAPI work on Chromium. However the run-api-tests script still doesn't work on chromium-win, because determineBaseProductDir() doesn't return correct value for chromium-win. I left a FIXME at http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitdirs.pm?rev=95647#L164.
Comment 1 Xianzhu Wang 2011-09-23 00:17:05 PDT
Created attachment 108446 [details]
patch

I guessed the baseProductDir according to run-chromium-webkit-unit-tests.py, but I haven't tested it because I haven't a Windows build environment.
Comment 2 Tony Chang 2011-09-26 11:01:06 PDT
Comment on attachment 108446 [details]
patch

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

> Tools/Scripts/webkitdirs.pm:164
> -            # FIXME: set the correct baseProductDir for chromium-win.
> +            $baseProductDir = "$sourceDir/Source/WebKit/chromium";

I think this is $sourceDir/Source/WebKit/chromium/build after chromium r102514.
Comment 3 Xianzhu Wang 2011-09-26 19:55:14 PDT
Created attachment 108781 [details]
patch v2

The change in chromium also affected run-chromium-webkit-unit-tests. Fixed it by the way.
Comment 4 Tony Chang 2011-09-27 11:46:02 PDT
Comment on attachment 108781 [details]
patch v2

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

> Tools/Scripts/run-chromium-webkit-unit-tests:-38
> -# Allow running this script from any directory.
> -my $sourceRootDir = File::Spec->catfile($FindBin::Bin, "../..");
> -chdir($sourceRootDir);

Why was this removed?  Did it no longer work?
Comment 5 Xianzhu Wang 2011-09-27 21:58:50 PDT
(In reply to comment #4)
> (From update of attachment 108781 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=108781&action=review
> 
> > Tools/Scripts/run-chromium-webkit-unit-tests:-38
> > -# Allow running this script from any directory.
> > -my $sourceRootDir = File::Spec->catfile($FindBin::Bin, "../..");
> > -chdir($sourceRootDir);
> 
> Why was this removed?  Did it no longer work?

This is no longer needed because we use productDir() to find the executable. I've verified that there is no test depending on cwd. webkit_unit_test can be run from any dir.
Comment 6 WebKit Review Bot 2011-09-28 10:45:59 PDT
Comment on attachment 108781 [details]
patch v2

Clearing flags on attachment: 108781

Committed r96235: <http://trac.webkit.org/changeset/96235>
Comment 7 WebKit Review Bot 2011-09-28 10:46:04 PDT
All reviewed patches have been landed.  Closing bug.