mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 1310215 - Add a verbose argument to mach install which provides useful information in case the android emulator startup fails. r=ahal
MozReview-Commit-ID: EhuBgeewqtb
This commit is contained in:
parent
95aec74c11
commit
f6d49dac63
@ -1076,10 +1076,12 @@ class Install(MachCommandBase):
|
||||
|
||||
@Command('install', category='post-build',
|
||||
description='Install the package on the machine, or on a device.')
|
||||
def install(self):
|
||||
@CommandArgument('--verbose', '-v', action='store_true',
|
||||
help='Print verbose output when installing to an Android emulator.')
|
||||
def install(self, verbose=False):
|
||||
if conditions.is_android(self):
|
||||
from mozrunner.devices.android_device import verify_android_device
|
||||
verify_android_device(self)
|
||||
verify_android_device(self, verbose=verbose)
|
||||
ret = self._run_make(directory=".", target='install', ensure_exit_code=False)
|
||||
if ret == 0:
|
||||
self.notify('Install complete')
|
||||
|
@ -75,7 +75,7 @@ AVD_DICT = {
|
||||
}
|
||||
|
||||
|
||||
def verify_android_device(build_obj, install=False, xre=False, debugger=False):
|
||||
def verify_android_device(build_obj, install=False, xre=False, debugger=False, verbose=False):
|
||||
"""
|
||||
Determine if any Android device is connected via adb.
|
||||
If no device is found, prompt to start an emulator.
|
||||
@ -91,7 +91,7 @@ def verify_android_device(build_obj, install=False, xre=False, debugger=False):
|
||||
already connected.
|
||||
"""
|
||||
device_verified = False
|
||||
emulator = AndroidEmulator('*', substs=build_obj.substs)
|
||||
emulator = AndroidEmulator('*', substs=build_obj.substs, verbose=verbose)
|
||||
devices = emulator.dm.devices()
|
||||
if (len(devices) > 0) and ('device' in [d[1] for d in devices]):
|
||||
device_verified = True
|
||||
|
Loading…
Reference in New Issue
Block a user