Bug 1201370 - Add emulator parameter to cppunit test. r=ahal
authorJohn Dai <jdai@mozilla.com>
Fri, 25 Sep 2015 11:49:40 +0800
changeset 299675 6e77b81bc2a7b2240a75d6ecf0341058f23cdc52
parent 299674 351b02a1cf9f22084c0f0bc8da494a2aa26f087e
child 299676 5bf9fdd2d0842d84cfde9cecc31596d150515cee
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1201370
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1201370 - Add emulator parameter to cppunit test. r=ahal
testing/mozharness/configs/b2g/emulator_automation_config.py
testing/remotecppunittests.py
--- a/testing/mozharness/configs/b2g/emulator_automation_config.py
+++ b/testing/mozharness/configs/b2g/emulator_automation_config.py
@@ -50,16 +50,17 @@ config = {
         "cppunittest": {
             "options": [
                 "--dm_trans=adb",
                 "--symbols-path=%(symbols_path)s",
                 "--xre-path=%(xre_path)s",
                 "--addEnv",
                 "LD_LIBRARY_PATH=/vendor/lib:/system/lib:/system/b2g",
                 "--with-b2g-emulator=%(b2gpath)s",
+                 "--emulator=%(emulator)s",
                 "."
             ],
             "run_filename": "remotecppunittests.py",
             "testsdir": "cppunittest"
         },
         "crashtest": {
             "options": [
                 "--adbpath=%(adbpath)s",
--- a/testing/remotecppunittests.py
+++ b/testing/remotecppunittests.py
@@ -222,28 +222,29 @@ class RemoteCPPUnittestOptions(cppunitte
                     help = "remote directory to use as test root (eg. /data/local/tests)")
         # /data/local/tests is used because it is usually not possible to set +x permissions
         # on binaries on /mnt/sdcard
         defaults["remote_test_root"] = "/data/local/tests"
 
         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\")")
         defaults["add_env"] = None
 
         self.set_defaults(**defaults)
 
 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:
             # because we just started the emulator, we need more than the
             # default number of retries here.
             retryLimit = 50
         else:
             retryLimit = 5