Bug 54703 - webkitpy.layout_tests.port.config_unittest fails on Win32
Summary: webkitpy.layout_tests.port.config_unittest fails on Win32
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dirk Pranke
URL:
Keywords:
Depends on:
Blocks: 48728
  Show dependency treegraph
 
Reported: 2011-02-17 18:14 PST by Dirk Pranke
Modified: 2011-02-18 15:39 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.53 KB, patch)
2011-02-17 19:16 PST, Dirk Pranke
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Pranke 2011-02-17 18:14:39 PST
webkitpy.layout_tests.port.config_unittest fails on Win32 because $HOME isn't defined.
Comment 1 Dirk Pranke 2011-02-17 19:16:52 PST
Created attachment 82900 [details]
Patch
Comment 2 Adam Roben (:aroben) 2011-02-17 19:28:52 PST
Comment on attachment 82900 [details]
Patch

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

> Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py:195
> +        if sys.platform == 'win32':
> +            os.chdir(os.environ['USERPROFILE'])
> +        else:
> +            os.chdir(os.environ['HOME'])

I wonder if we should come up with our own abstraction for this? Maybe not if it's only needed by test code.
Comment 3 Dirk Pranke 2011-02-17 19:44:51 PST
(In reply to comment #2)
> (From update of attachment 82900 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=82900&action=review
> 
> > Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py:195
> > +        if sys.platform == 'win32':
> > +            os.chdir(os.environ['USERPROFILE'])
> > +        else:
> > +            os.chdir(os.environ['HOME'])
> 
> I wonder if we should come up with our own abstraction for this? Maybe not if it's only needed by test code.

Yeah, I'd just as soon have it show up in at least two other places before we bother. Anyway, there's no significance to $HOME in this test, it's just known to be outside (or at least above) the tree.
Comment 4 Dirk Pranke 2011-02-18 15:39:44 PST
Committed r79042: <http://trac.webkit.org/changeset/79042>