Bug 1403366 - Don't set MOZILLA_FIVE_HOME from multiple scripts. r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 28 Sep 2017 11:00:09 +0900
changeset 437845 68765cc0c5303f20a127eb79ddad486f45b0c0da
parent 437844 e39909e9029ed7d4a19afd1af19b9271e22e296f
child 437846 69ef6d0839598d79e02398a745df0799022aae59
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1403366
milestone58.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 1403366 - Don't set MOZILLA_FIVE_HOME from multiple scripts. r=froydnj It was seldom used before previous commit and now does nothing.
build/automation.py.in
build/unix/run-mozilla.sh
testing/gtest/rungtests.py
testing/mozbase/mozrunner/mozrunner/utils.py
testing/remotecppunittests.py
testing/runcppunittests.py
--- a/build/automation.py.in
+++ b/build/automation.py.in
@@ -194,17 +194,16 @@ class Automation(object):
     preloadEnvVar = None
     if self.UNIXISH or self.IS_MAC:
       envVar = "LD_LIBRARY_PATH"
       preloadEnvVar = "LD_PRELOAD"
       if self.IS_MAC:
         envVar = "DYLD_LIBRARY_PATH"
         dmdLibrary = "libdmd.dylib"
       else: # unixish
-        env['MOZILLA_FIVE_HOME'] = xrePath
         dmdLibrary = "libdmd.so"
       if envVar in env:
         ldLibraryPath = ldLibraryPath + ":" + env[envVar]
       env[envVar] = ldLibraryPath
     elif self.IS_WIN32:
       env["PATH"] = env["PATH"] + ";" + str(ldLibraryPath)
       dmdLibrary = "dmd.dll"
       preloadEnvVar = "MOZ_REPLACE_MALLOC_LIB"
--- a/build/unix/run-mozilla.sh
+++ b/build/unix/run-mozilla.sh
@@ -232,23 +232,18 @@ fi
 ##
 ## Make sure the program is executable
 ##
 if [ ! -x "$MOZ_PROGRAM" ]
 then
 	moz_bail "Cannot execute $MOZ_PROGRAM."
 fi
 #
-##
-## Set MOZILLA_FIVE_HOME
-##
-MOZILLA_FIVE_HOME=$MOZ_DIST_BIN
-
 if [ -z "$MRE_HOME" ]; then
-    MRE_HOME=$MOZILLA_FIVE_HOME
+    MRE_HOME=$MOZ_DIST_BIN"
 fi
 ##
 ## Set LD_LIBRARY_PATH
 ##
 ## On Solaris we use $ORIGIN (set in RUNPATH) instead of LD_LIBRARY_PATH 
 ## to locate shared libraries. 
 ##
 ## When a shared library is a symbolic link, $ORIGIN will be replaced with
@@ -310,17 +305,16 @@ then
 fi
 
 # Disable Gnome crash dialog
 GNOME_DISABLE_CRASH_DIALOG=1
 export GNOME_DISABLE_CRASH_DIALOG
 
 if [ "$moz_debug" -eq 1 ]
 then
-  echo "MOZILLA_FIVE_HOME=$MOZILLA_FIVE_HOME"
   echo "  LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
   if [ -n "$LD_LIBRARYN32_PATH" ]
   then
   	echo "LD_LIBRARYN32_PATH=$LD_LIBRARYN32_PATH"
   fi
   if [ -n "$LD_LIBRARYN64_PATH" ]
   then
   	echo "LD_LIBRARYN64_PATH=$LD_LIBRARYN64_PATH"
@@ -344,17 +338,17 @@ then
   echo "       ADDON_PATH=$ADDON_PATH"
   echo "      MOZ_PROGRAM=$MOZ_PROGRAM"
   echo "      MOZ_TOOLKIT=$MOZ_TOOLKIT"
   echo "        moz_debug=$moz_debug"
   echo "     moz_debugger=$moz_debugger"
   echo "moz_debugger_args=$moz_debugger_args"
 fi
 #
-export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
+export LD_LIBRARY_PATH
 export SHLIB_PATH LIBPATH LIBRARY_PATH ADDON_PATH DYLD_LIBRARY_PATH
 
 if [ $moz_debug -eq 1 ]
 then
 	moz_debug_program ${1+"$@"}
 else
 	moz_run_program ${1+"$@"}
 fi
--- a/testing/gtest/rungtests.py
+++ b/testing/gtest/rungtests.py
@@ -76,17 +76,16 @@ class GTests(object):
         if not result:
             log.testFail("gtest | test failed with return code %d", proc.proc.returncode)
         return result
 
     def build_core_environment(self, env = {}):
         """
         Add environment variables likely to be used across all platforms, including remote systems.
         """
-        env["MOZILLA_FIVE_HOME"] = self.xre_path
         env["MOZ_XRE_DIR"] = self.xre_path
         env["MOZ_GMP_PATH"] = os.pathsep.join(
             os.path.join(self.xre_path, p, "1.0")
             for p in ('gmp-fake', 'gmp-fakeopenh264')
         )
         env["XPCOM_DEBUG_BREAK"] = "stack-and-abort"
         env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
         env["MOZ_CRASHREPORTER"] = "1"
--- a/testing/mozbase/mozrunner/mozrunner/utils.py
+++ b/testing/mozbase/mozrunner/mozrunner/utils.py
@@ -99,17 +99,16 @@ def test_environment(xrePath, env=None, 
     else:
         ldLibraryPath = xrePath
 
     envVar = None
     dmdLibrary = None
     preloadEnvVar = None
     if mozinfo.isUnix:
         envVar = "LD_LIBRARY_PATH"
-        env['MOZILLA_FIVE_HOME'] = xrePath
         dmdLibrary = "libdmd.so"
         preloadEnvVar = "LD_PRELOAD"
     elif mozinfo.isMac:
         envVar = "DYLD_LIBRARY_PATH"
         dmdLibrary = "libdmd.dylib"
         preloadEnvVar = "DYLD_INSERT_LIBRARIES"
     elif mozinfo.isWin:
         envVar = "PATH"
--- a/testing/remotecppunittests.py
+++ b/testing/remotecppunittests.py
@@ -102,17 +102,16 @@ class RemoteCPPUnitTests(cppunittests.CP
                 self.remote_bin_dir, os.path.basename(local_file))
             self.device.pushFile(local_file, remote_file)
 
     def build_environment(self):
         env = self.build_core_environment()
         env['LD_LIBRARY_PATH'] = self.remote_bin_dir
         env["TMPDIR"] = self.remote_tmp_dir
         env["HOME"] = self.remote_home_dir
-        env["MOZILLA_FIVE_HOME"] = self.remote_home_dir
         env["MOZ_XRE_DIR"] = self.remote_bin_dir
         if self.options.add_env:
             for envdef in self.options.add_env:
                 envdef_parts = envdef.split("=", 1)
                 if len(envdef_parts) == 2:
                     env[envdef_parts[0]] = envdef_parts[1]
                 elif len(envdef_parts) == 1:
                     env[envdef_parts[0]] = ""
--- a/testing/runcppunittests.py
+++ b/testing/runcppunittests.py
@@ -79,17 +79,16 @@ class CPPUnitTests(object):
             else:
                 self.log.test_end(basename, status='PASS', expected='PASS')
             return result
 
     def build_core_environment(self, env={}):
         """
         Add environment variables likely to be used across all platforms, including remote systems.
         """
-        env["MOZILLA_FIVE_HOME"] = self.xre_path
         env["MOZ_XRE_DIR"] = self.xre_path
         # TODO: switch this to just abort once all C++ unit tests have
         # been fixed to enable crash reporting
         env["XPCOM_DEBUG_BREAK"] = "stack-and-abort"
         env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
         env["MOZ_CRASHREPORTER"] = "1"
         return env