зеркало из https://github.com/mozilla/gecko-dev.git
bug 914925 - fix --debugger for mochitest on OS X. r=jmaher
This commit is contained in:
Родитель
41d1ebb524
Коммит
0cf4101913
|
@ -471,7 +471,7 @@ class Automation(object):
|
|||
os.unlink(pwfilePath)
|
||||
return 0
|
||||
|
||||
def environment(self, env = None, xrePath = None, crashreporter = True):
|
||||
def environment(self, env=None, xrePath=None, crashreporter=True, debugger=False):
|
||||
if xrePath == None:
|
||||
xrePath = self.DIST_BIN
|
||||
if env == None:
|
||||
|
@ -490,7 +490,7 @@ class Automation(object):
|
|||
elif self.IS_WIN32:
|
||||
env["PATH"] = env["PATH"] + ";" + str(ldLibraryPath)
|
||||
|
||||
if crashreporter:
|
||||
if crashreporter and not debugger:
|
||||
env['MOZ_CRASHREPORTER_NO_REPORT'] = '1'
|
||||
env['MOZ_CRASHREPORTER'] = '1'
|
||||
else:
|
||||
|
|
|
@ -402,7 +402,7 @@ def systemMemory():
|
|||
"""
|
||||
return int(os.popen("free").readlines()[1].split()[1])
|
||||
|
||||
def environment(xrePath, env=None, crashreporter=True):
|
||||
def environment(xrePath, env=None, crashreporter=True, debugger=False):
|
||||
"""populate OS environment variables for mochitest"""
|
||||
|
||||
env = os.environ.copy() if env is None else env
|
||||
|
@ -430,7 +430,7 @@ def environment(xrePath, env=None, crashreporter=True):
|
|||
env['XRE_NO_WINDOWS_CRASH_DIALOG'] = '1'
|
||||
env['NS_TRACE_MALLOC_DISABLE_STACKS'] = '1'
|
||||
|
||||
if crashreporter:
|
||||
if crashreporter and not debugger:
|
||||
env['MOZ_CRASHREPORTER_NO_REPORT'] = '1'
|
||||
env['MOZ_CRASHREPORTER'] = '1'
|
||||
else:
|
||||
|
|
|
@ -48,7 +48,7 @@ class RemoteAutomation(Automation):
|
|||
self._remoteLog = logfile
|
||||
|
||||
# Set up what we need for the remote environment
|
||||
def environment(self, env = None, xrePath = None, crashreporter = True):
|
||||
def environment(self, env=None, xrePath=None, crashreporter=True, debugger=False):
|
||||
# Because we are running remote, we don't want to mimic the local env
|
||||
# so no copying of os.environ
|
||||
if env is None:
|
||||
|
@ -56,11 +56,11 @@ class RemoteAutomation(Automation):
|
|||
|
||||
# Except for the mochitest results table hiding option, which isn't
|
||||
# passed to runtestsremote.py as an actual option, but through the
|
||||
# MOZ_CRASHREPORTER_DISABLE environment variable.
|
||||
# MOZ_HIDE_RESULTS_TABLE environment variable.
|
||||
if 'MOZ_HIDE_RESULTS_TABLE' in os.environ:
|
||||
env['MOZ_HIDE_RESULTS_TABLE'] = os.environ['MOZ_HIDE_RESULTS_TABLE']
|
||||
|
||||
if crashreporter:
|
||||
if crashreporter and not debugger:
|
||||
env['MOZ_CRASHREPORTER_NO_REPORT'] = '1'
|
||||
env['MOZ_CRASHREPORTER'] = '1'
|
||||
else:
|
||||
|
|
|
@ -619,9 +619,9 @@ class Mochitest(MochitestUtilsMixin):
|
|||
self.copyExtraFilesToProfile(options)
|
||||
return manifest
|
||||
|
||||
def buildBrowserEnv(self, options):
|
||||
def buildBrowserEnv(self, options, debugger=False):
|
||||
"""build the environment variables for the specific test and operating system"""
|
||||
browserEnv = self.environment(xrePath=options.xrePath)
|
||||
browserEnv = self.environment(xrePath=options.xrePath, debugger=debugger)
|
||||
|
||||
# These variables are necessary for correct application startup; change
|
||||
# via the commandline at your own risk.
|
||||
|
@ -941,7 +941,7 @@ class Mochitest(MochitestUtilsMixin):
|
|||
|
||||
self.leak_report_file = os.path.join(options.profilePath, "runtests_leaks.log")
|
||||
|
||||
browserEnv = self.buildBrowserEnv(options)
|
||||
browserEnv = self.buildBrowserEnv(options, debuggerInfo is not None)
|
||||
if browserEnv is None:
|
||||
return 1
|
||||
|
||||
|
|
|
@ -522,8 +522,8 @@ class MochiRemote(Mochitest):
|
|||
self._dm.pushFile(fHandle.name, os.path.join(deviceRoot, "robotium.config"))
|
||||
os.unlink(fHandle.name)
|
||||
|
||||
def buildBrowserEnv(self, options):
|
||||
browserEnv = Mochitest.buildBrowserEnv(self, options)
|
||||
def buildBrowserEnv(self, options, debugger=False):
|
||||
browserEnv = Mochitest.buildBrowserEnv(self, options, debugger=debugger)
|
||||
self.buildRobotiumConfig(options, browserEnv)
|
||||
return browserEnv
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче