Closed
Bug 899292
Opened 12 years ago
Closed 12 years ago
Running mochitests from mach fails due to topobjdir being undefined
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla25
People
(Reporter: chmanchester, Assigned: gps)
References
Details
Attachments
(1 file)
1.34 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
Running mach mochitest-plain after building this morning's inbound results in the following:
File "/Users/mozilla/m-c/testing/mochitest/mach_commands.py", line 268, in run_mochitest_plain
return self.run_mochitest(test_file, 'plain', **kwargs)
File "/Users/mozilla/m-c/testing/mochitest/mach_commands.py", line 299, in run_mochitest
**kwargs)
File "/Users/mozilla/m-c/testing/mochitest/mach_commands.py", line 93, in run_mochitest_test
('.py', 'r', imp.PY_SOURCE))
File "/Users/mozilla/m-c/obj-x86_64-apple-darwin12.4.0/_tests/testing/mochitest/runtests.py", line 26, in <module>
from mochitest_options import MochitestOptions
File "/Users/mozilla/m-c/obj-x86_64-apple-darwin12.4.0/_tests/testing/mochitest/mochitest_options.py", line 17, in <module>
build_obj = MozbuildObject.from_environment()
File "/Users/mozilla/m-c/python/mozbuild/mozbuild/base.py", line 166, in from_environment
topobjdir = os.path.normpath(config['topobjdir'] or topobjdir)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 318, in normpath
initial_slashes = path.startswith('/')
This is due to mach_commands.py triggering initialization of a MozbuildObject on import of runtests.py. Mozbuild doesn't find a topobjdir path, so it fails.
I'm not sure how to solve this properly, but I did find that wrapping a try except around this line: http://mxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/base.py#166 and just setting topobjdir to None results in the command succeeding to run mochitests.
Assignee | ||
Updated•12 years ago
|
Component: General → Build Config
Product: Testing → Core
Assignee | ||
Comment 1•12 years ago
|
||
Trivial patch should do it.
Attachment #782847 -
Flags: review?(mh+mozilla)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → gps
Assignee | ||
Comment 3•12 years ago
|
||
Comment on attachment 782847 [details] [diff] [review]
Exception constructing environment when topobjdir isn't available
Please verify this fixes it.
Attachment #782847 -
Flags: feedback?(cmanchester)
Updated•12 years ago
|
Attachment #782847 -
Flags: review?(mh+mozilla) → review+
Reporter | ||
Comment 4•12 years ago
|
||
Comment on attachment 782847 [details] [diff] [review]
Exception constructing environment when topobjdir isn't available
Review of attachment 782847 [details] [diff] [review]:
-----------------------------------------------------------------
::: python/mozbuild/mozbuild/base.py
@@ +164,5 @@
> raise ObjdirMismatchException(topobjdir, config['topobjdir'])
>
> + topobjdir = config['topobjdir'] or topobjdir
> + if topobjdir:
> + topobjdir = os.path.normpath(config['topobjdir'])
This works with |topobjdir = os.path.normpath(topobjdir)| instead of this line.
Attachment #782847 -
Flags: feedback?(cmanchester)
Assignee | ||
Comment 5•12 years ago
|
||
Comment 6•12 years ago
|
||
(In reply to Chris Manchester [:chmanchester] from comment #4)
> Comment on attachment 782847 [details] [diff] [review]
> Exception constructing environment when topobjdir isn't available
>
> Review of attachment 782847 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: python/mozbuild/mozbuild/base.py
> @@ +164,5 @@
> > raise ObjdirMismatchException(topobjdir, config['topobjdir'])
> >
> > + topobjdir = config['topobjdir'] or topobjdir
> > + if topobjdir:
> > + topobjdir = os.path.normpath(config['topobjdir'])
>
> This works with |topobjdir = os.path.normpath(topobjdir)| instead of this
> line.
Confirming this worked while the original version _does not_.
Assignee | ||
Comment 7•12 years ago
|
||
Good thing I landed the fixed version.
Comment 8•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Comment 9•12 years ago
|
||
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•