Bug 1075072 - Pass debuggerArgs as a string to get_debugger_info. r=ted
authorTom Tromey <tom@tromey.com>
Fri, 24 Oct 2014 09:40:00 -0400
changeset 212680 43a764935c1b00cbd83e6438cfb5e6ae433a68ad
parent 212679 f9fd1dde27c5304b73cbca8324bb8f909d62dd39
child 212681 10dff2924f03af64dcc0c251253189f811cf74b6
push id51030
push userryanvm@gmail.com
push dateTue, 28 Oct 2014 15:40:46 +0000
treeherdermozilla-inbound@43a764935c1b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1075072
milestone36.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 1075072 - Pass debuggerArgs as a string to get_debugger_info. r=ted
testing/mozbase/mozdebug/mozdebug/mozdebug.py
testing/xpcshell/runxpcshelltests.py
--- a/testing/mozbase/mozdebug/mozdebug/mozdebug.py
+++ b/testing/mozbase/mozdebug/mozdebug/mozdebug.py
@@ -79,19 +79,19 @@ def get_debugger_info(debugger, debugger
     Get the information about the requested debugger.
 
     Returns a dictionary containing the |path| of the debugger executable,
     if it will run in |interactive| mode, its arguments and whether it needs
     to escape arguments it passes to the debugged program (|requiresEscapedArgs|).
     If the debugger cannot be found in the system, returns |None|.
 
     :param debugger: The name of the debugger.
-    :param debuggerArgs: If specified, it's the list of arguments to pass to the
-     debugger. A debugger specific separator arguments is appended at the end of
-     that list.
+    :param debuggerArgs: If specified, it's the arguments to pass to the debugger,
+    as a string. Any debugger-specific separator arguments are appended after these
+    arguments.
     :param debuggerInteractive: If specified, forces the debugger to be interactive.
     '''
 
     debuggerPath = None
 
     if debugger:
         # Append '.exe' to the debugger on Windows if it's not present,
         # so things like '--debugger=devenv' work.
@@ -113,23 +113,24 @@ def get_debugger_info(debugger, debugger
         return default
 
     # Define a namedtuple to access the debugger information from the outside world.
     DebuggerInfo = namedtuple(
         'DebuggerInfo',
         ['path', 'interactive', 'args', 'requiresEscapedArgs']
     )
 
-    debugger_arguments = get_debugger_info('args', [])
+    debugger_arguments = []
 
-    # Extend the default arguments for the chosen debugger with the ones passed in, if any.
     if debuggerArgs:
         # Append the provided debugger arguments at the end of the arguments list.
         debugger_arguments += debuggerArgs.split()
 
+    debugger_arguments += get_debugger_info('args', [])
+
     # Override the default debugger interactive mode if needed.
     debugger_interactive = get_debugger_info('interactive', False)
     if debuggerInteractive:
         debugger_interactive = debuggerInteractive
 
     d = DebuggerInfo(
         debuggerPath,
         debugger_interactive,
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -1069,21 +1069,16 @@ class XPCShellTests(object):
                 testingModulesDir = os.path.abspath(testingModulesDir)
 
             if not testingModulesDir.endswith(os.path.sep):
                 testingModulesDir += os.path.sep
 
         self.debuggerInfo = None
 
         if debugger:
-            # We need a list of arguments, not a string, to feed into
-            # the debugger
-            if debuggerArgs:
-                debuggerArgs = debuggerArgs.split();
-
             self.debuggerInfo = mozdebug.get_debugger_info(debugger, debuggerArgs, debuggerInteractive)
 
         self.xpcshell = xpcshell
         self.xrePath = xrePath
         self.appPath = appPath
         self.symbolsPath = symbolsPath
         self.manifest = manifest
         self.testdirs = testdirs