Bug 1380132 - Part 2 - Set MOZ_DEVELOPER_OBJ_DIR before launching Firefox. r=gps
MozReview-Commit-ID: CvSUt2KueHr
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -375,16 +375,18 @@ class RefTest(object):
return test_environment(**kwargs)
def buildBrowserEnv(self, options, profileDir):
browserEnv = self.environment(
xrePath=options.xrePath, debugger=options.debugger)
browserEnv["XPCOM_DEBUG_BREAK"] = "stack"
if hasattr(options, "topsrcdir"):
browserEnv["MOZ_DEVELOPER_REPO_DIR"] = options.topsrcdir
+ if hasattr(options, "topobjdir"):
+ browserEnv["MOZ_DEVELOPER_OBJ_DIR"] = options.topobjdir
if mozinfo.info["asan"]:
# Disable leak checking for reftests for now
if "ASAN_OPTIONS" in browserEnv:
browserEnv["ASAN_OPTIONS"] += ":detect_leaks=0"
else:
browserEnv["ASAN_OPTIONS"] = "detect_leaks=0"
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1320,16 +1320,17 @@ class RunProgram(MachCommandBase):
path = os.path.join(self.topobjdir, 'tmp', 'scratch_user')
if not os.path.isdir(path):
os.makedirs(path)
args.append('-profile')
args.append(path)
extra_env = {
'MOZ_DEVELOPER_REPO_DIR': self.topsrcdir,
+ 'MOZ_DEVELOPER_OBJ_DIR': self.topobjdir,
}
if not enable_crash_reporter:
extra_env['MOZ_CRASHREPORTER_DISABLE'] = '1'
else:
extra_env['MOZ_CRASHREPORTER'] = '1'
if disable_e10s:
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1586,16 +1586,18 @@ toolbar#nav-bar {
env=env,
debugger=debugger,
dmdPath=options.dmdPath,
lsanPath=lsanPath,
ubsanPath=ubsanPath)
if hasattr(options, "topsrcdir"):
browserEnv["MOZ_DEVELOPER_REPO_DIR"] = options.topsrcdir
+ if hasattr(options, "topobjdir"):
+ browserEnv["MOZ_DEVELOPER_OBJ_DIR"] = options.topobjdir
# These variables are necessary for correct application startup; change
# via the commandline at your own risk.
browserEnv["XPCOM_DEBUG_BREAK"] = "stack"
# interpolate environment passed with options
try:
browserEnv.update(
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -945,16 +945,18 @@ class XPCShellTests(object):
self.env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
# Don't permit remote connections by default.
# MOZ_DISABLE_NONLOCAL_CONNECTIONS can be set to "0" to temporarily
# enable non-local connections for the purposes of local testing.
# Don't override the user's choice here. See bug 1049688.
self.env.setdefault('MOZ_DISABLE_NONLOCAL_CONNECTIONS', '1')
if self.mozInfo.get("topsrcdir") is not None:
self.env["MOZ_DEVELOPER_REPO_DIR"] = self.mozInfo["topsrcdir"].encode()
+ if self.mozInfo.get("topobjdir") is not None:
+ self.env["MOZ_DEVELOPER_OBJ_DIR"] = self.mozInfo["topobjdir"].encode()
# Disable the content process sandbox for the xpcshell tests. They
# currently attempt to do things like bind() sockets, which is not
# compatible with the sandbox.
self.env["MOZ_DISABLE_CONTENT_SANDBOX"] = "1"
def buildEnvironment(self):
"""