Bug 1028090 - Enable xpcshell-test debugging on Windows platforms. r=jmaher
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Mon, 28 Jul 2014 12:04:00 -0400
changeset 218493 8923901b8b54587b4c6355a3c7495d42379f3420
parent 218492 99e1f3c50a12775a3f59843cc60b9febc3e0785e
child 218494 126614591becdb4b87964b2cffe4034c0645356e
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1028090
milestone34.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 1028090 - Enable xpcshell-test debugging on Windows platforms. r=jmaher
build/automationutils.py
testing/xpcshell/mach_commands.py
--- a/build/automationutils.py
+++ b/build/automationutils.py
@@ -72,16 +72,28 @@ DEBUGGER_INFO = {
   },
 
   "lldb": {
     "interactive": True,
     "args": "--",
     "requiresEscapedArgs": True
   },
 
+  # Visual Studio Debugger Support
+  "devenv.exe": {
+    "interactive": True,
+    "args": "-debugexe"
+  },
+
+  # Visual C++ Express Debugger Support
+  "wdexpress.exe": {
+    "interactive": True,
+    "args": "-debugexe"
+  },
+
   # valgrind doesn't explain much about leaks unless you set the
   # '--leak-check=full' flag. But there are a lot of objects that are
   # semi-deliberately leaked, so we set '--show-possibly-lost=no' to avoid
   # uninteresting output from those objects. We set '--smc-check==all-non-file'
   # and '--vex-iropt-register-updates=allregs-at-mem-access' so that valgrind
   # deals properly with JIT'd JavaScript code.
   "valgrind": {
     "interactive": False,
--- a/testing/xpcshell/mach_commands.py
+++ b/testing/xpcshell/mach_commands.py
@@ -136,20 +136,26 @@ class XPCShellRunner(MozbuildObject):
         xpcshell_filter = TestStartFilter()
         self.log_manager.terminal_handler.addFilter(xpcshell_filter)
 
         tests_dir = os.path.join(self.topobjdir, '_tests', 'xpcshell')
         modules_dir = os.path.join(self.topobjdir, '_tests', 'modules')
         # We want output from the test to be written immediately if we are only
         # running a single test.
         verbose_output = test_path is not None or (manifest and len(manifest.test_paths())==1)
+        
+        # We need to attach the '.exe' extension on Windows for the debugger to
+        # work properly.
+        xpcsExecutable = 'xpcshell'
+        if os.name == 'nt':
+          xpcsExecutable += '.exe'
 
         args = {
             'manifest': manifest,
-            'xpcshell': os.path.join(self.bindir, 'xpcshell'),
+            'xpcshell': os.path.join(self.bindir, xpcsExecutable),
             'mozInfo': os.path.join(self.topobjdir, 'mozinfo.json'),
             'symbolsPath': os.path.join(self.distdir, 'crashreporter-symbols'),
             'interactive': interactive,
             'keepGoing': keep_going,
             'logfiles': False,
             'sequential': sequential,
             'shuffle': shuffle,
             'testsRootDir': tests_dir,