Bug 77058

Summary: test-webkitpy: executive_unittest fails if PYTHONPATH isn't set
Product: WebKit Reporter: Dirk Pranke <dpranke>
Component: New BugsAssignee: Dirk Pranke <dpranke>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, mrowe, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
fix ChangeLog eric: review+, eric: commit-queue-

Dirk Pranke
Reported 2012-01-25 16:38:10 PST
test-webkitpy: executive_unittest fails if PYTHONPATH isn't set
Attachments
Patch (2.50 KB, patch)
2012-01-25 16:38 PST, Dirk Pranke
no flags
fix ChangeLog (2.86 KB, patch)
2012-01-25 16:41 PST, Dirk Pranke
eric: review+
eric: commit-queue-
Dirk Pranke
Comment 1 2012-01-25 16:38:28 PST
Dirk Pranke
Comment 2 2012-01-25 16:41:23 PST
Created attachment 124034 [details] fix ChangeLog
Eric Seidel (no email)
Comment 3 2012-01-25 16:45:14 PST
Comment on attachment 124034 [details] fix ChangeLog This seems ugly. Is this the best way to go?
Dirk Pranke
Comment 4 2012-01-25 16:48:00 PST
Without the PYTHONPATH settings, the script'll choke on the "from webkit... import lines" since it doesn't know where webkitpy is. We could probably change those to just "import executive" and have it work, but that's not normal python style. I'm open to other suggestions.
Dirk Pranke
Comment 5 2012-01-25 16:50:37 PST
Actually, if you think about it, it might be a good thing for the unit tests for executive to be ensuring what the PYTHONPATH is set to, regardless.
Eric Seidel (no email)
Comment 6 2012-01-25 17:33:24 PST
Comment on attachment 124034 [details] fix ChangeLog View in context: https://bugs.webkit.org/attachment.cgi?id=124034&action=review I don't really like this, but I also don't think it matters that much. Please add a comment about why we're doing this. Specifically to allow this unittest to call itself. > Tools/Scripts/test-webkitpy:45 > + webkit_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) Why is this needed? __file__ should always be absolute, no?
Dirk Pranke
Comment 7 2012-01-25 17:41:25 PST
(In reply to comment #6) > (From update of attachment 124034 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=124034&action=review > > I don't really like this, but I also don't think it matters that much. Please add a comment about why we're doing this. Specifically to allow this unittest to call itself. > Will do. > > Tools/Scripts/test-webkitpy:45 > > + webkit_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) > > Why is this needed? __file__ should always be absolute, no? No, it isn't. Try running ./test-webkitpy and you'll see :(.
Dirk Pranke
Comment 8 2012-01-25 17:47:53 PST
Adam Barth
Comment 9 2012-01-26 01:40:49 PST
This didn't fix the problem.
Dirk Pranke
Comment 10 2012-01-26 10:27:11 PST
(In reply to comment #9) > This didn't fix the problem. Hm. Consider me completely befuddled, then. I will look into it.
Note You need to log in before you can comment on or make changes to this bug.