Skip to content

Commit

Permalink
Bug 1062689 - Run local mochitest and reftest output through fix_maco…
Browse files Browse the repository at this point in the history
…sx_stack.py on Mac. r=ted.
  • Loading branch information
nnethercote committed Sep 5, 2014
1 parent f5a8655 commit 2a6091a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/automation.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ class Automation(object):
import fix_stack_using_bpsyms as stackFixerModule
stackFixerFunction = lambda line: stackFixerModule.fixSymbols(line, symbolsPath)
del sys.path[0]
elif self.IS_DEBUG_BUILD and self.IS_MAC and False:
elif self.IS_DEBUG_BUILD and self.IS_MAC:
# Run each line through a function in fix_macosx_stack.py (uses atos)
sys.path.insert(0, utilityPath)
import fix_macosx_stack as stackFixerModule
Expand Down
6 changes: 6 additions & 0 deletions testing/mochitest/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,12 @@ def import_stackFixerModule(module_name):
stackFixerModule = import_stackFixerModule('fix_stack_using_bpsyms')
stackFixerFunction = lambda line: stackFixerModule.fixSymbols(line, self.symbolsPath)

elif mozinfo.isMac:
# Run each line through fix_macosx_stack.py (uses atos).
# This method is preferred for developer machines, so we don't have to run "make buildsymbols".
stackFixerModule = import_stackFixerModule('fix_macosx_stack')
stackFixerFunction = lambda line: stackFixerModule.fixSymbols(line)

elif mozinfo.isLinux:
# Run each line through fix_linux_stack.py (uses addr2line).
# This method is preferred for developer machines, so we don't have to run "make buildsymbols".
Expand Down
3 changes: 2 additions & 1 deletion tools/rb/fix_macosx_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def fixSymbols(line):
# throw away the bad symbol, but keep balance tree structure
before = balance_tree_re.match(before).groups()[0]

return before + info + after + "\n"
nl = '\n' if line[-1] == '\n' else ''
return before + info + after + nl
else:
sys.stderr.write("Warning: File \"" + file + "\" does not exist.\n")
return line
Expand Down

0 comments on commit 2a6091a

Please sign in to comment.