Closed
Bug 1203627
Opened 7 years ago
Closed 7 years ago
mach android-emulator fails if 'emulator' in $PATH is not the Android emulator
Categories
(Testing :: General, defect)
Testing
General
Tracking
(firefox43 fixed)
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: gbrown, Assigned: gbrown)
Details
Attachments
(1 file)
3.31 KB,
patch
|
ahal
:
review+
|
Details | Diff | Splinter Review |
For instance, if the b2g emulator is in $PATH: $ mach android-emulator 0:00.66 Fetching and installing AVD. This may take a few minutes... 0:57.04 Starting Android emulator running Android 4.3... WARNING: Emulator has already completed! 1:12.11 Unable to verify that emulator is running. I think finding 'emulator' on the $PATH is a nice feature for some, but this shows it is dangerous too. Other locations (.mozbuild, ANDROID_SDK_ROOT) should at least be used preferentially to $PATH.
![]() |
Assignee | |
Comment 1•7 years ago
|
||
I have changed the search order so that $PATH is checked last, rather than first. I think 90% of cases will find the emulator before getting to the $PATH; hopefully the remainder have the right emulator in the $PATH! (While debugging, I noticed I also missed a required call to os.path.expanduser -- added that fix too.)
Attachment #8659391 -
Flags: review?(ahalberstadt)
Comment 2•7 years ago
|
||
Comment on attachment 8659391 [details] [diff] [review] change search order Review of attachment 8659391 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, r+ with comment fixed. ::: testing/mozbase/mozrunner/mozrunner/devices/android_device.py @@ +516,5 @@ > > if not found: > # Can exe be found in the default bootstrap location? > + exe_path = os.path.expanduser(os.path.join( > + '~', '.mozbuild', 'android-sdk-linux', subdir, exe)) '~/.mozbuild' is self.statedir, should use that instead in case it changes.
Attachment #8659391 -
Flags: review?(ahalberstadt) → review+
![]() |
Assignee | |
Comment 3•7 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #2) > '~/.mozbuild' is self.statedir, should use that instead in case it changes. Good idea, but statedir is <objdir>/.mozbuild. I want the avds to be cached alongside the sdk and ndk stored by bootstrap, in ~/.mozbuild. I found http://hg.mozilla.org/mozilla-central/annotate/9ed17db42e3e/python/mozboot/mozboot/debian.py#l127 -- I'll do something similar.
Comment 4•7 years ago
|
||
Oh yeah, you're right.. sorry. I think you can access it from a MachCommand by doing: self._mach_context.state_dir
https://hg.mozilla.org/mozilla-central/rev/ce840d7632ba
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•