Merge mozilla-central to autoland. a=merge CLOSED TREE
authorCiure Andrei <aciure@mozilla.com>
Thu, 18 Oct 2018 10:19:03 +0300
changeset 500324 aa851fc2ed73e31c338e9a1ba8f8538b0845d219
parent 500321 320f407a7677d7cef64f6e2213fc2e1449511da1 (current diff)
parent 500323 bd60f5f2f402f09dca1f2178a07a8b544d0763d1 (diff)
child 500325 9305a99ea1c3aab53a9675be0f76ec60b1a30e5b
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone64.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
Merge mozilla-central to autoland. a=merge CLOSED TREE
--- a/python/mozbuild/mozpack/executables.py
+++ b/python/mozbuild/mozpack/executables.py
@@ -123,18 +123,16 @@ def elfhack(path):
     if subprocess.call(cmd) != 0:
         errors.fatal('Error executing ' + ' '.join(cmd))
 
 
 def xz_compress(path):
     '''
     Execute xz to compress the given path.
     '''
-    path = os.path.abspath(path)
-
     if open(path, 'rb').read(5)[1:] == '7zXZ':
         print('%s is already compressed' % path)
         return
     
     from buildconfig import substs
     xz = substs.get('XZ')
     cmd = [xz, '-zkf', path]
 
@@ -152,33 +150,20 @@ def xz_compress(path):
     elif substs.get('CPU_ARCH') == 'x86':
         bcj = '--x86'
 
     if bcj:
         cmd.extend([bcj])
 
     # We need to explicitly specify the LZMA filter chain to ensure consistent builds
     # across platforms. Note that the dict size must be less then 16MiB per the hardcoded
-    # value in mozglue/linker/XZStream.cpp. See:
+    # value in mozglue/linker/XZStream.cpp. This is the default LZMA filter chain for for
+    # xz-utils version 5.0. See:
     # https://github.com/xz-mirror/xz/blob/v5.0.0/src/liblzma/lzma/lzma_encoder_presets.c
     # https://github.com/xz-mirror/xz/blob/v5.0.0/src/liblzma/api/lzma/container.h#L31
-
-    if not substs.get('DEVELOPER_OPTIONS'):
-        # This is the default LZMA filter chain for for xz-utils version 5.0. See:
-        cmd.extend(['--lzma2=dict=8MiB,lc=3,lp=0,pb=2,mode=normal,nice=64,mf=bt4,depth=0'])
-    else:
-        # This is the filter chain for level=3, which is the highest
-        # compression fast preset.
-        cmd.extend(['--lzma2=dict=8MiB,lc=3,lp=0,pb=2,mode=fast,nice=273,mf=hc4,depth=24'])
-
-    print('xz-compressing %s with "%s"...' % (path, ' '.join(cmd)))
-
-    import time
-    t0 = time.time()
+    cmd.extend(['--lzma2=dict=8MiB,lc=3,lp=0,pb=2,mode=normal,nice=64,mf=bt4,depth=0'])
+    print('xz-compressing %s with %s' % (path, ' '.join(cmd)))
 
     if subprocess.call(cmd) != 0:
         errors.fatal('Error executing ' + ' '.join(cmd))
         return
 
-    elapsed = time.time() - t0
-    print('xz-compressing %s with "%s"... DONE (%.2fs)' % (path, ' '.join(cmd), elapsed))
-
     os.rename(path + '.xz', path)
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_quit_restart.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_quit_restart.py
@@ -1,16 +1,18 @@
 # 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/.
 
 from __future__ import absolute_import, print_function
 
 import urllib
 
+from unittest import skip
+
 from marionette_driver import errors
 from marionette_driver.by import By
 from marionette_harness import MarionetteTestCase
 
 
 def inline(doc):
     return "data:text/html;charset=utf-8,{}".format(urllib.quote(doc))
 
@@ -37,42 +39,42 @@ class TestServerQuitApplication(Marionet
 
         self.assertIn("cause", resp)
 
         self.marionette.client.close()
         self.marionette.instance.runner.wait()
 
         return resp["cause"]
 
-    def tst_types(self):
+    def test_types(self):
         for typ in [42, True, "foo", []]:
             print("testing type {}".format(type(typ)))
             with self.assertRaises(errors.InvalidArgumentException):
                 self.marionette._send_message("quit", typ)
 
         with self.assertRaises(errors.InvalidArgumentException):
             self.quit("foo")
 
-    def tst_undefined_default(self):
+    def test_undefined_default(self):
         cause = self.quit()
         self.assertEqual("shutdown", cause)
 
-    def tst_empty_default(self):
+    def test_empty_default(self):
         cause = self.quit(())
         self.assertEqual("shutdown", cause)
 
-    def tst_incompatible_flags(self):
+    def test_incompatible_flags(self):
         with self.assertRaises(errors.InvalidArgumentException):
             self.quit(("eAttemptQuit", "eForceQuit"))
 
-    def tst_attempt_quit(self):
+    def test_attempt_quit(self):
         cause = self.quit(("eAttemptQuit",))
         self.assertEqual("shutdown", cause)
 
-    def tst_force_quit(self):
+    def test_force_quit(self):
         cause = self.quit(("eForceQuit",))
         self.assertEqual("shutdown", cause)
 
 
 class TestQuitRestart(MarionetteTestCase):
 
     def setUp(self):
         MarionetteTestCase.setUp(self)
@@ -110,116 +112,117 @@ class TestQuitRestart(MarionetteTestCase
             Components.utils.import("resource://gre/modules/Services.jsm");
             let flags = Ci.nsIAppStartup.eAttemptQuit;
             if (arguments[0]) {
               flags |= Ci.nsIAppStartup.eRestart;
             }
             Services.startup.quit(flags);
         """, script_args=(restart,))
 
-    def tst_force_restart(self):
+    def test_force_restart(self):
         self.marionette.restart()
         self.assertEqual(self.marionette.profile, self.profile)
         self.assertNotEqual(self.marionette.session_id, self.session_id)
 
         # A forced restart will cause a new process id
         self.assertNotEqual(self.marionette.process_id, self.pid)
         self.assertNotEqual(self.marionette.get_pref("startup.homepage_welcome_url"),
                             "about:about")
 
-    def tst_force_clean_restart(self):
+    def test_force_clean_restart(self):
         self.marionette.restart(clean=True)
         self.assertNotEqual(self.marionette.profile, self.profile)
         self.assertNotEqual(self.marionette.session_id, self.session_id)
         # A forced restart will cause a new process id
         self.assertNotEqual(self.marionette.process_id, self.pid)
         self.assertNotEqual(self.marionette.get_pref("startup.homepage_welcome_url"),
                             "about:about")
 
-    def tst_force_quit(self):
+    def test_force_quit(self):
         self.marionette.quit()
 
         self.assertEqual(self.marionette.session, None)
         with self.assertRaisesRegexp(errors.InvalidSessionIdException, "Please start a session"):
             self.marionette.get_url()
 
-    def tst_force_clean_quit(self):
+    def test_force_clean_quit(self):
         self.marionette.quit(clean=True)
 
         self.assertEqual(self.marionette.session, None)
         with self.assertRaisesRegexp(errors.InvalidSessionIdException, "Please start a session"):
             self.marionette.get_url()
 
         self.marionette.start_session()
         self.assertNotEqual(self.marionette.profile, self.profile)
         self.assertNotEqual(self.marionette.session_id, self.session_id)
         self.assertNotEqual(self.marionette.get_pref("startup.homepage_welcome_url"),
                             "about:about")
 
-    def tst_no_in_app_clean_restart(self):
+    def test_no_in_app_clean_restart(self):
         # Test that in_app and clean cannot be used in combination
         with self.assertRaisesRegexp(ValueError, "cannot be triggered with the clean flag set"):
             self.marionette.restart(in_app=True, clean=True)
 
-    def tst_in_app_restart(self):
+    def test_in_app_restart(self):
         self.marionette.restart(in_app=True)
 
         self.assertEqual(self.marionette.profile, self.profile)
         self.assertNotEqual(self.marionette.session_id, self.session_id)
 
         # An in-app restart will keep the same process id only on Linux
         if self.marionette.session_capabilities["platformName"] == "linux":
             self.assertEqual(self.marionette.process_id, self.pid)
         else:
             self.assertNotEqual(self.marionette.process_id, self.pid)
 
         self.assertNotEqual(self.marionette.get_pref("startup.homepage_welcome_url"),
                             "about:about")
 
-    def tst_in_app_restart_with_callback(self):
+    def test_in_app_restart_with_callback(self):
         self.marionette.restart(in_app=True,
                                 callback=lambda: self.shutdown(restart=True))
 
         self.assertEqual(self.marionette.profile, self.profile)
         self.assertNotEqual(self.marionette.session_id, self.session_id)
 
         # An in-app restart will keep the same process id only on Linux
         if self.marionette.session_capabilities["platformName"] == "linux":
             self.assertEqual(self.marionette.process_id, self.pid)
         else:
             self.assertNotEqual(self.marionette.process_id, self.pid)
 
         self.assertNotEqual(self.marionette.get_pref("startup.homepage_welcome_url"),
                             "about:about")
 
-    def tst_in_app_restart_with_callback_not_callable(self):
+    def test_in_app_restart_with_callback_not_callable(self):
         with self.assertRaisesRegexp(ValueError, "is not callable"):
             self.marionette.restart(in_app=True, callback=4)
 
-    def tst_in_app_restart_with_callback_but_process_quit(self):
+    def test_in_app_restart_with_callback_but_process_quit(self):
         timeout_shutdown = self.marionette.DEFAULT_SHUTDOWN_TIMEOUT
         # Wait at least 70s for the hang monitor in case of a shutdown hang
         self.marionette.DEFAULT_SHUTDOWN_TIMEOUT = 70
 
         try:
             with self.assertRaisesRegexp(IOError, "Process unexpectedly quit without restarting"):
                 self.marionette.restart(in_app=True, callback=lambda: self.shutdown(restart=False))
         finally:
             self.marionette.DEFAULT_SHUTDOWN_TIMEOUT = timeout_shutdown
 
-    def tst_in_app_restart_with_callback_missing_shutdown(self):
+    def test_in_app_restart_with_callback_missing_shutdown(self):
         try:
             timeout_shutdown = self.marionette.DEFAULT_SHUTDOWN_TIMEOUT
             self.marionette.DEFAULT_SHUTDOWN_TIMEOUT = 5
 
             with self.assertRaisesRegexp(IOError, "the connection to Marionette server is lost"):
                 self.marionette.restart(in_app=True, callback=lambda: False)
         finally:
             self.marionette.DEFAULT_SHUTDOWN_TIMEOUT = timeout_shutdown
 
+    @skip("Bug 1397612 - Hang of Marionette client after the restart")
     def test_in_app_restart_safe_mode(self):
 
         def restart_in_safe_mode():
             with self.marionette.using_context("chrome"):
                 self.marionette.execute_script("""
                   Components.utils.import("resource://gre/modules/Services.jsm");
 
                   let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
@@ -236,96 +239,96 @@ class TestQuitRestart(MarionetteTestCase
             self.assertFalse(self.is_safe_mode, "Safe Mode is unexpectedly enabled")
             self.marionette.restart(in_app=True, callback=restart_in_safe_mode)
             self.assertTrue(self.is_safe_mode, "Safe Mode is not enabled")
         finally:
             if self.marionette.session is None:
                 self.marionette.start_session()
             self.marionette.quit(clean=True)
 
-    def tst_in_app_quit(self):
+    def test_in_app_quit(self):
         self.marionette.quit(in_app=True)
 
         self.assertEqual(self.marionette.session, None)
         with self.assertRaisesRegexp(errors.InvalidSessionIdException, "Please start a session"):
             self.marionette.get_url()
 
         self.marionette.start_session()
         self.assertEqual(self.marionette.profile, self.profile)
         self.assertNotEqual(self.marionette.session_id, self.session_id)
         self.assertNotEqual(self.marionette.get_pref("startup.homepage_welcome_url"),
                             "about:about")
 
-    def tst_in_app_quit_with_callback(self):
+    def test_in_app_quit_with_callback(self):
         self.marionette.quit(in_app=True, callback=self.shutdown)
         self.assertEqual(self.marionette.session, None)
         with self.assertRaisesRegexp(errors.InvalidSessionIdException, "Please start a session"):
             self.marionette.get_url()
 
         self.marionette.start_session()
         self.assertEqual(self.marionette.profile, self.profile)
         self.assertNotEqual(self.marionette.session_id, self.session_id)
         self.assertNotEqual(self.marionette.get_pref("startup.homepage_welcome_url"),
                             "about:about")
 
-    def tst_in_app_quit_with_callback_missing_shutdown(self):
+    def test_in_app_quit_with_callback_missing_shutdown(self):
         try:
             timeout = self.marionette.DEFAULT_SHUTDOWN_TIMEOUT
             self.marionette.DEFAULT_SHUTDOWN_TIMEOUT = 5
 
             with self.assertRaisesRegexp(IOError, "Process still running"):
                 self.marionette.quit(in_app=True, callback=lambda: False)
         finally:
             self.marionette.DEFAULT_SHUTDOWN_TIMEOUT = timeout
 
-    def tst_in_app_quit_with_callback_not_callable(self):
+    def test_in_app_quit_with_callback_not_callable(self):
         with self.assertRaisesRegexp(ValueError, "is not callable"):
             self.marionette.restart(in_app=True, callback=4)
 
-    def tst_in_app_quit_with_dismissed_beforeunload_prompt(self):
+    def test_in_app_quit_with_dismissed_beforeunload_prompt(self):
         self.marionette.navigate(inline("""
           <input type="text">
           <script>
             window.addEventListener("beforeunload", function (event) {
               event.preventDefault();
             });
           </script>
         """))
 
         self.marionette.find_element(By.TAG_NAME, "input").send_keys("foo")
         self.marionette.quit(in_app=True)
         self.marionette.start_session()
 
-    def tst_reset_context_after_quit_by_set_context(self):
+    def test_reset_context_after_quit_by_set_context(self):
         # Check that we are in content context which is used by default in
         # Marionette
         self.assertNotIn("chrome://", self.marionette.get_url(),
                          "Context does not default to content")
 
         self.marionette.set_context("chrome")
         self.marionette.quit(in_app=True)
         self.assertEqual(self.marionette.session, None)
         self.marionette.start_session()
         self.assertNotIn("chrome://", self.marionette.get_url(),
                          "Not in content context after quit with using_context")
 
-    def tst_reset_context_after_quit_by_using_context(self):
+    def test_reset_context_after_quit_by_using_context(self):
         # Check that we are in content context which is used by default in
         # Marionette
         self.assertNotIn("chrome://", self.marionette.get_url(),
                          "Context does not default to content")
 
         with self.marionette.using_context("chrome"):
             self.marionette.quit(in_app=True)
             self.assertEqual(self.marionette.session, None)
             self.marionette.start_session()
             self.assertNotIn("chrome://", self.marionette.get_url(),
                              "Not in content context after quit with using_context")
 
-    def tst_keep_context_after_restart_by_set_context(self):
+    def test_keep_context_after_restart_by_set_context(self):
         # Check that we are in content context which is used by default in
         # Marionette
         self.assertNotIn("chrome://", self.marionette.get_url(),
                          "Context doesn't default to content")
 
         # restart while we are in chrome context
         self.marionette.set_context("chrome")
         self.marionette.restart(in_app=True)
@@ -334,17 +337,17 @@ class TestQuitRestart(MarionetteTestCase
         if self.marionette.session_capabilities["platformName"] == "linux":
             self.assertEqual(self.marionette.process_id, self.pid)
         else:
             self.assertNotEqual(self.marionette.process_id, self.pid)
 
         self.assertIn("chrome://", self.marionette.get_url(),
                       "Not in chrome context after a restart with set_context")
 
-    def tst_keep_context_after_restart_by_using_context(self):
+    def test_keep_context_after_restart_by_using_context(self):
         # Check that we are in content context which is used by default in
         # Marionette
         self.assertNotIn("chrome://", self.marionette.get_url(),
                          "Context does not default to content")
 
         # restart while we are in chrome context
         with self.marionette.using_context('chrome'):
             self.marionette.restart(in_app=True)