Backed out changeset ff0705eda4bd (bug 1403366)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 04 Oct 2017 01:26:56 +0200
changeset 437559 7cdf44b91cbe430823b6fe9592a714c242a6faa0
parent 437558 f945ca94b6ddba97172c43549b8768d12e0d0c6b
child 437560 de17c3ee3de4b1fe839a4cc64f244db454ee2bc4
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)
bugs1403366
milestone58.0a1
backs outff0705eda4bd4cffa7e12b68b213317da9f2b839
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
Backed out changeset ff0705eda4bd (bug 1403366)
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,16 +194,17 @@ 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,18 +232,23 @@ 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=$MOZ_DIST_BIN"
+    MRE_HOME=$MOZILLA_FIVE_HOME
 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
@@ -305,16 +310,17 @@ 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"
@@ -338,17 +344,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 LD_LIBRARY_PATH
+export MOZILLA_FIVE_HOME 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,16 +76,17 @@ 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,16 +99,17 @@ 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,16 +102,17 @@ 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,16 +79,17 @@ 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