Closed
Bug 1032484
Opened 11 years ago
Closed 11 years ago
mach can't find objdir when using GECKO_PATH in a b2g build
Categories
(Firefox Build System :: General, defect)
Tracking
(b2g-v2.1 fixed)
RESOLVED
FIXED
2.0 S5 (4july)
Tracking | Status | |
---|---|---|
b2g-v2.1 | --- | fixed |
People
(Reporter: dbaron, Assigned: dbaron)
Details
Attachments
(1 file)
743 bytes,
patch
|
ahal
:
review+
|
Details | Diff | Splinter Review |
I was trying to use mach to run the b2g emulator tests, since it's supposed to be the way to run things. I'm doing this in a b2g tree located in /home/dbaron/builds/B2G-master-emulator with a .userconfig file that looks like this:
=====
export B2G_DEBUG=1
# use my mozilla-central tree, with patches
export GECKO_PATH=/home/dbaron/builds/ssd/mozilla-central/mozilla
if [ "$B2G_DEBUG" ]
then
GECKO_OBJDIR=objdir-gecko-debugopt
else
GECKO_OBJDIR=objdir-gecko
fi
=====
However, trying to use mach in this directory (B2G-master-emulator) gives the error:
=====
$ ./mach mochitest-remote
It looks like you tried to run a mach command from an invalid context. The mochitest-remote
command failed to meet the following conditions:
is_b2g - Must have a Boot to Gecko build.
Run |mach help| to show a list of all commands available to the current context.
=====
(Note that the is_emulator condition passed.)
Some debugging shows that the underlying problem is the os.path.join call here:
https://hg.mozilla.org/mozilla-central/file/606848e8adfc/python/mozbuild/mozbuild/base.py#l206
which is combining the variables:
topsrcdir = /home/dbaron/builds/ssd/mozilla-central/mozilla
topobjdir = objdir-gecko-debugopt
In this build setup, these aren't the right things to combine.
It's not (yet, anyway) clear to me how this ought to be fixed.
Assignee | ||
Comment 1•11 years ago
|
||
Horrible hack, I think.
Attachment #8448323 -
Flags: feedback?(ahalberstadt)
Comment 2•11 years ago
|
||
Comment on attachment 8448323 [details] [diff] [review]
my workaround for now (diff against B2G repo)
Review of attachment 8448323 [details] [diff] [review]:
-----------------------------------------------------------------
::: tools/mach_b2g_bootstrap.py
@@ +192,5 @@
> + # Absolutize GECKO_OBJDIR here, since otherwise mach will try to
> + # absolutize it relative to the topsrcdir, which might be different
> + # if GECKO_PATH is in use.
> + if os.environ.get('GECKO_OBJDIR') is not None:
> + os.environ['GECKO_OBJDIR'] = os.path.join(b2g_home, os.environ['GECKO_OBJDIR'])
Hackiness is relative ;). This makes sense, and as far as I've been able to determine should do the right thing in all cases. I don't think there's a better way of fixing this that won't break other obscure corner cases somewhere else. Let me know if you need help getting this landed.
Attachment #8448323 -
Flags: feedback?(ahalberstadt) → review+
Assignee | ||
Comment 3•11 years ago
|
||
OK; I created a pull request at https://github.com/mozilla-b2g/B2G/pull/363 , but I'm not sure what the procedures for landing are (or who the set of people with permission to merge pull requests are).
Flags: needinfo?(ahalberstadt)
Comment 4•11 years ago
|
||
Since this is only touching the mach bootstrap script, I don't think we need anyone else's review. Merged:
https://github.com/mozilla-b2g/B2G/commit/159e5bcbe7c8594322a43f13f7cd53de012fd026
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(ahalberstadt)
Resolution: --- → FIXED
Updated•11 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
•