Bug 787203 - [mozrunner] Pass application arguments to FennecRunner; r=ahal

MozReview-Commit-ID: KGPOL2P94ED

--HG--
extra : rebase_source : 9d7aaf4fd3f67429d54b664e5243026790a7cf2c
This commit is contained in:
Maja Frydrychowicz 2016-06-30 17:20:54 -04:00
Родитель f5a12ff0d3
Коммит e3d59c813d
2 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -161,6 +161,9 @@ class DeviceRunner(BaseRunner):
class FennecRunner(DeviceRunner):
def __init__(self, cmdargs=None, **kwargs):
super(FennecRunner, self).__init__(**kwargs)
self.cmdargs = cmdargs or []
@property
def command(self):
@ -171,6 +174,7 @@ class FennecRunner(DeviceRunner):
app = "%s/org.mozilla.gecko.BrowserApp" % self.app_ctx.remote_process
cmd.extend(['am', 'start', '-a', 'android.activity.MAIN', '-n', app])
params = ['-no-remote', '-profile', self.app_ctx.remote_profile]
params.extend(self.cmdargs)
cmd.extend(['--es', 'args', '"%s"' % ' '.join(params)])
# Append env variables in the form "--es env0 MOZ_CRASHREPORTER=1"
for (count, (k, v)) in enumerate(self._device_env.iteritems()):

Просмотреть файл

@ -114,6 +114,7 @@ def FennecEmulatorRunner(avd='mozemulator-4.3',
Defaults to None, which causes the device_class to guess based on PATH.
:param app: Name of Fennec app (often org.mozilla.fennec_$USER)
Defaults to 'org.mozilla.fennec'
:param cmdargs: Arguments to pass into binary.
:returns: A DeviceRunner for Android emulators.
"""
kwargs['app_ctx'] = get_app_context('fennec')(app, adb_path=adb_path,