Bug 1077230 - Enable the DMD test on Mac 10.8. r=glandium.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 07 Oct 2014 23:29:07 -0700
changeset 234277 c20e7032aa3b31b897ebe32b7c15e82d7bf480b2
parent 234276 b820349b5b4666e3ed8c750a58b60e12e8c64ba2
child 234278 73e48ae73c32565185cb2eeaa1b8621f1949a76c
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1077230
milestone35.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 1077230 - Enable the DMD test on Mac 10.8. r=glandium.
memory/replace/dmd/dmd.py
memory/replace/dmd/test/xpcshell.ini
--- a/memory/replace/dmd/dmd.py
+++ b/memory/replace/dmd/dmd.py
@@ -140,20 +140,22 @@ variable is used to find breakpad symbol
 
 # Fix stacks if necessary: first write the output to a tempfile, then replace
 # the original file with it.
 def fixStackTraces(args):
     # This append() call is needed to make the import statements work when this
     # script is installed as a symlink.
     sys.path.append(os.path.dirname(__file__))
 
-    # XXX: should incorporate fix_stack_using_bpsyms.py here as well, like in
-    #      testing/mochitests/runtests.py
+    bpsyms = os.environ.get('BREAKPAD_SYMBOLS_PATH', None)
     sysname = platform.system()
-    if sysname == 'Linux':
+    if bpsyms and os.path.exists(bpsyms):
+        import fix_stack_using_bpsyms as fixModule
+        fix = lambda line: fixModule.fixSymbols(line, bpsyms)
+    elif sysname == 'Linux':
         import fix_linux_stack as fixModule
         fix = lambda line: fixModule.fixSymbols(line)
     elif sysname == 'Darwin':
         import fix_macosx_stack as fixModule
         fix = lambda line: fixModule.fixSymbols(line)
     else:
         fix = None  # there is no fix script for Windows
 
--- a/memory/replace/dmd/test/xpcshell.ini
+++ b/memory/replace/dmd/test/xpcshell.ini
@@ -4,13 +4,13 @@ support-files =
   full-heap-expected2.txt
   full-heap-expected3.txt
   full-heap-expected4.txt
   full-reports-expected1.txt
   full-reports-expected2.txt
   full-reports-expected3.txt
   full-reports-expected4.txt
 
+# Bug 1077230 explains why this test is disabled on Mac 10.6.
+# Bug 1076446 is open for getting this test working on on Windows.
 [test_dmd.js]
 dmd = true
-# XXX: bug 1076446 is open for running this test on Windows, and bug 1077230 is
-# open for running it on Mac.
-run-if = os == 'linux'
+run-if = os == 'linux' || os == 'mac' && os_version != '10.6'