Bug 1362051 - Update tests have to set MOZ_MARIONETTE environment variable. r=ato,maja_zf
authorHenrik Skupin <mail@hskupin.info>
Thu, 04 May 2017 22:10:50 +0200
changeset 356812 41badc1634a88fb5f4e33cc74100e2f0c84e255d
parent 356811 a9339d769d2b03f5a21b8e7a804a0d2d528af1af
child 356813 3b6c8fcf9211cc45f5552dc14a46b79b6d42e025
push id89970
push userkwierso@gmail.com
push dateFri, 05 May 2017 21:20:56 +0000
treeherdermozilla-inbound@c3d254b2070d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, maja_zf
bugs1362051, 1355888
milestone55.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 1362051 - Update tests have to set MOZ_MARIONETTE environment variable. r=ato,maja_zf To allow update tests to use source builds of Firefox before bug 1355888 was landed, the MOZ_MARIONETTE environment variable has to be be pre-emptively set. Otherwise Marionette will not be activated after the update has been applied. MozReview-Commit-ID: Hqb6SjYtOPR
testing/firefox-ui/harness/firefox_ui_harness/runners/update.py
--- a/testing/firefox-ui/harness/firefox_ui_harness/runners/update.py
+++ b/testing/firefox-ui/harness/firefox_ui_harness/runners/update.py
@@ -1,12 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+import os
 import sys
 
 import mozfile
 import mozinstall
 
 from firefox_ui_harness.runners import FirefoxUITestRunner
 from firefox_ui_harness.testcases import UpdateTestCase
 
@@ -28,16 +29,25 @@ class UpdateTestRunner(FirefoxUITestRunn
 
         self.prefs.update(DEFAULT_PREFS)
 
         self.run_direct_update = not kwargs.pop('update_fallback_only', False)
         self.run_fallback_update = not kwargs.pop('update_direct_only', False)
 
         self.test_handlers = [UpdateTestCase]
 
+        # With bug 1355888 Marionette uses an environment variable to identify
+        # if it should be active. It's important especially for restarts of the
+        # application to set this, because if it is not present Marionette will
+        # not start. To allow updates from builds before this change, the
+        # environment variable has to be pre-emptively set.
+        # TODO: Can be removed once we no longer have to test updates from
+        # Firefox 55.0 and earlier.
+        os.environ['MOZ_MARIONETTE'] = '1'
+
     def run_tests(self, tests):
         # Used to store the last occurred exception because we execute
         # run_tests() multiple times
         self.exc_info = None
 
         failed = 0
         source_folder = self.get_application_folder(self.original_bin)