Bug 1201370 - Add emulator parameter to cppunit test. r=ahal

This commit is contained in:
John Dai 2015-09-25 11:49:40 +08:00
parent 3206c9962c
commit 30a7b5afae
2 changed files with 4 additions and 2 deletions

View File

@ -55,6 +55,7 @@ config = {
"--addEnv",
"LD_LIBRARY_PATH=/vendor/lib:/system/lib:/system/b2g",
"--with-b2g-emulator=%(b2gpath)s",
"--emulator=%(emulator)s",
"."
],
"run_filename": "remotecppunittests.py",

View File

@ -227,7 +227,8 @@ class RemoteCPPUnittestOptions(cppunittests.CPPUnittestOptions):
self.add_option("--with-b2g-emulator", action = "store",
type = "string", dest = "with_b2g_emulator",
help = "Start B2G Emulator (specify path to b2g home)")
self.add_option("--emulator", default="arm", choices=["x86", "arm"],
help = "Architecture of emulator to use: x86 or arm")
self.add_option("--addEnv", action = "append",
type = "string", dest = "add_env",
help = "additional remote environment variable definitions (eg. --addEnv \"somevar=something\")")
@ -238,7 +239,7 @@ class RemoteCPPUnittestOptions(cppunittests.CPPUnittestOptions):
def run_test_harness(options, args):
if options.with_b2g_emulator:
from mozrunner import B2GEmulatorRunner
runner = B2GEmulatorRunner(b2g_home=options.with_b2g_emulator)
runner = B2GEmulatorRunner(arch=options.emulator, b2g_home=options.with_b2g_emulator)
runner.start()
if options.dm_trans == "adb":
if options.with_b2g_emulator: