Bug 69360

Summary: new-run-webkit-tests appends "/Debug" or "/Release" to $WEBKITOUTPUTDIR
Product: WebKit Reporter: Raphael Kubo da Costa (:rakuco) <rakuco>
Component: Tools / TestsAssignee: Dirk Pranke <dpranke>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dpranke, eric, leandro, ojan, webkit.review.bot
Priority: P2 Keywords: NRWT
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 88680    
Attachments:
Description Flags
Patch
none
add unit test eric: review+

Description Raphael Kubo da Costa (:rakuco) 2011-10-04 12:02:09 PDT
I have a custom build directory location, namely $webkitroot/WebKitBuild/Debug-{qt,efl,gtk}, so I export the $WEBKITOUTPUTDIR environment variable to that location.

With old-run-webkit-tests, I can pass "--efl" and it will launch $WEBKITOUTPUTDIR/Programs/DumpRenderTree. However, if I pass "--product=efl --debug" to new-run-webkit-tests, it will call "webkit-build-directory --configuration --debug", which will return $WEBKITOUTPUTDIR/Debug. This, in turn, means n-r-w-t will try to launch $WEBKITOUTPUTDIR/Debug/Programs/DumpRenderTree, which does not exist.

The problems seems to come from the fact that webkit-build-directory does not pass "--efl" or "--gtk" to webkitdirs.pm, so the usesPerConfigurationBuildDirectory function always returns false.
Comment 1 Eric Seidel (no email) 2011-10-04 12:04:04 PDT
I'm confused.  You're expecting WEBKITOUTPUTDIR to be used directly without any /Debug suffix?
Comment 2 Raphael Kubo da Costa (:rakuco) 2011-10-04 12:11:22 PDT
Yes, just like o-w-r-t does -- in fact, I'd like to have from webkitdirs.pm's determineConfigurationProductDir behave the same way it does with o-r-w-t when usesPerConfigurationBuildDirectory returns true.
Comment 3 Dirk Pranke 2012-06-18 14:16:09 PDT
it looks like after http://trac.webkit.org/changeset/103234 this is only true for gtk and apple win.
Comment 4 Dirk Pranke 2012-06-18 14:39:23 PDT
Created attachment 148174 [details]
Patch
Comment 5 Eric Seidel (no email) 2012-06-19 09:01:38 PDT
Comment on attachment 148174 [details]
Patch

I don't understand what this does.  It seems like it woule be possible to test that Config with a MockExecutive makes the right call.. so we should test that, no?
Comment 6 Dirk Pranke 2012-06-19 09:19:18 PDT
(In reply to comment #5)
> (From update of attachment 148174 [details])
> I don't understand what this does.  It seems like it woule be possible to test that Config with a MockExecutive makes the right call.. so we should test that, no?

The change makes sure --gtk is passed to webkit-build-directory. In webkit-build-directory, if --gtk is passed, then it returns $WEBKITOUTPUTDIR instead of $WEBKITOUTPUTDIR/$configuration  .

I can add the mock test as you say. I was reluctant to add a test that actually verified that webkit-build-directory was doing something different for gtk specifically.
Comment 7 Dirk Pranke 2012-06-19 11:36:23 PDT
Created attachment 148373 [details]
add unit test
Comment 8 Eric Seidel (no email) 2012-06-20 14:14:51 PDT
Comment on attachment 148373 [details]
add unit test

OK.
Comment 9 Dirk Pranke 2012-06-20 14:22:48 PDT
Committed r120863: <http://trac.webkit.org/changeset/120863>