Closed
Bug 848447
Opened 12 years ago
Closed 12 years ago
os.path.sep issues in xpcshell mach commands
Categories
(Testing :: XPCShell Harness, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla22
People
(Reporter: mbrubeck, Assigned: mbrubeck)
References
Details
Attachments
(1 file)
|
3.53 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
I noticed some issues in the path handling in XPCShellRunner.
For example, it does not handle paths on windows that end in "/" because it uses code that checks for a trailing os.path.sep (which is "\" on Windows). The code to get a relative path also fails sometimes because self.topsrcdir may use different path separators than the test_file argument.
This code also has problems when run in a directory other than $topsrcdir (for example, when using bug 840588 to run mach in a different directory), because the os.path.isfile and os.path.isdir checks assume that $PWD == $topsrcdir.
This patch uses the new mozpack.path module to ensure that comparisons are all done using "/" as the path separator, and it makes the code explicitly handle paths relative to $topsrcdir.
Attachment #721782 -
Flags: review?(ted)
Comment 1•12 years ago
|
||
Comment on attachment 721782 [details] [diff] [review]
patch
Review of attachment 721782 [details] [diff] [review]:
-----------------------------------------------------------------
I really haven't reviewed any mach code yet. I probably should, but you're better off with gps for now.
Attachment #721782 -
Flags: review?(ted) → review?(gps)
Comment 2•12 years ago
|
||
Comment on attachment 721782 [details] [diff] [review]
patch
Review of attachment 721782 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me.
Attachment #721782 -
Flags: review?(gps) → review+
| Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•