Bug 632954 - Allow passing in env to Fennec Marionette; r=gbrown
☠☠ backed out by d7e6fff52db3 ☠ ☠
authorMike Shal <mshal@mozilla.com>
Mon, 18 Mar 2019 23:52:41 +0000
changeset 465153 142ae187478da8a6c3899ef6409cafc6e60a9115
parent 465152 0615c775a0cf6e8f98e1c051cd574c0d602a738a
child 465154 503bcac735831eea887393d4759358220bcb6d99
push id80929
push usermshal@mozilla.com
push dateTue, 19 Mar 2019 23:01:47 +0000
treeherderautoland@429c96e4de32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs632954
milestone68.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 632954 - Allow passing in env to Fennec Marionette; r=gbrown The Fennec process needs a few extra environment variables for PGO, notably LLVM_PROFILE_FILE and MOZ_JAR_LOG_FILE to give the locations for the profile run outputs. FennecInstance needs to pass the "env" parameter on down so it can be used by DeviceRunner. Differential Revision: https://phabricator.services.mozilla.com/D22818
testing/marionette/client/marionette_driver/geckoinstance.py
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -397,30 +397,31 @@ class FennecInstance(GeckoInstance):
 
         # Do not allow background tabs to be zombified, otherwise for tests that
         # open additional tabs, the test harness tab itself might get unloaded
         "browser.tabs.disableBackgroundZombification": True,
     }
 
     def __init__(self, emulator_binary=None, avd_home=None, avd=None,
                  adb_path=None, serial=None, connect_to_running_emulator=False,
-                 package_name=None, *args, **kwargs):
+                 package_name=None, env=None, *args, **kwargs):
         required_prefs = deepcopy(FennecInstance.fennec_prefs)
         required_prefs.update(kwargs.get("prefs", {}))
 
         super(FennecInstance, self).__init__(*args, **kwargs)
         self.required_prefs.update(required_prefs)
 
         self.runner_class = FennecEmulatorRunner
         # runner args
         self._package_name = package_name
         self.emulator_binary = emulator_binary
         self.avd_home = avd_home
         self.adb_path = adb_path
         self.avd = avd
+        self.env = env
         self.serial = serial
         self.connect_to_running_emulator = connect_to_running_emulator
 
     @property
     def package_name(self):
         """
         Name of app to run on emulator.
 
@@ -455,16 +456,17 @@ class FennecInstance(GeckoInstance):
             "processOutputLine": [NullOutput()],
         }
 
         runner_args = {
             "app": self.package_name,
             "avd_home": self.avd_home,
             "adb_path": self.adb_path,
             "binary": self.emulator_binary,
+            "env": self.env,
             "profile": self.profile,
             "cmdargs": ["-marionette"] + self.app_args,
             "symbols_path": self.symbols_path,
             "process_args": process_args,
             "logdir": self.workspace or os.getcwd(),
             "serial": self.serial,
         }
         if self.avd: