Bug 82962 - run-webkit-tests with a relative --root causes tests to fail because DYLD_LIBRARY_PATH is not set
Summary: run-webkit-tests with a relative --root causes tests to fail because DYLD_LIB...
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: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-02 16:00 PDT by Simon Fraser (smfr)
Modified: 2012-04-02 20:52 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.70 KB, patch)
2012-04-02 16:06 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (2.54 KB, patch)
2012-04-02 17:19 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (8.59 KB, patch)
2012-04-02 17:49 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2012-04-02 16:00:30 PDT
On some of our bots we run run-webkit-tests with a --root parameter that is a folder name, rather than an absolute path.

That causes _build_path() to return just the folder name, which is then used to set DYLD_FRAMEWORK_PATH and DYLD_LIBRARY PATH, causing problems.

Its seems that _build_path() should always return an absolute path. Changing the last line to self._filesystem.join(os.getcwd(), build_directory, *comps) seems to work.
Comment 1 Simon Fraser (smfr) 2012-04-02 16:06:09 PDT
Created attachment 135216 [details]
Patch
Comment 2 Dirk Pranke 2012-04-02 16:33:55 PDT
Comment on attachment 135216 [details]
Patch

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

> Tools/Scripts/webkitpy/layout_tests/port/webkit.py:378
> +        return self._filesystem.join(os.getcwd(), build_directory, *comps)

This is fine but I'd probably do:

return self._filesystem.join(self.abspath(build_directory), *comps)

instead; that captures the intent a little more clearly (IMO, of course).
Comment 3 Dirk Pranke 2012-04-02 16:41:03 PDT
(In reply to comment #2)
> (From update of attachment 135216 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=135216&action=review
> 
> > Tools/Scripts/webkitpy/layout_tests/port/webkit.py:378
> > +        return self._filesystem.join(os.getcwd(), build_directory, *comps)
> 
> This is fine but I'd probably do:
> 
> return self._filesystem.join(self.abspath(build_directory), *comps)
> 
> instead; that captures the intent a little more clearly (IMO, of course).

Sorry, that should've been:

self._filesystem.join(self._filesystem.abspath(build_directory), *comps)
Comment 4 Eric Seidel (no email) 2012-04-02 17:09:45 PDT
Comment on attachment 135216 [details]
Patch

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

>>> Tools/Scripts/webkitpy/layout_tests/port/webkit.py:378
>>> +        return self._filesystem.join(os.getcwd(), build_directory, *comps)
>> 
>> This is fine but I'd probably do:
>> 
>> return self._filesystem.join(self.abspath(build_directory), *comps)
>> 
>> instead; that captures the intent a little more clearly (IMO, of course).
> 
> Sorry, that should've been:
> 
> self._filesystem.join(self._filesystem.abspath(build_directory), *comps)

You want self._filessystem.getcwd() any place you'd use os.getcwd(). :)
Comment 5 Eric Seidel (no email) 2012-04-02 17:12:16 PDT
Comment on attachment 135216 [details]
Patch

r- for the use of os.  Discussing on IRC now. :)
Comment 6 Simon Fraser (smfr) 2012-04-02 17:19:53 PDT
Created attachment 135236 [details]
Patch
Comment 7 Eric Seidel (no email) 2012-04-02 17:49:40 PDT
Created attachment 135245 [details]
Patch
Comment 8 Mark Rowe (bdash) 2012-04-02 18:05:58 PDT
It'd make a heck of a lot more sense to fix that existing issue in a separate patch. It makes it a lot harder to see what in this patch fixes the described issue.
Comment 9 WebKit Review Bot 2012-04-02 20:52:35 PDT
Comment on attachment 135245 [details]
Patch

Clearing flags on attachment: 135245

Committed r112981: <http://trac.webkit.org/changeset/112981>
Comment 10 WebKit Review Bot 2012-04-02 20:52:40 PDT
All reviewed patches have been landed.  Closing bug.