Commit 7dfa2f79 authored by dyen's avatar dyen Committed by Commit bot

Enable crash symbols unit test for Mac OSX.

R=nednguyen@google.com
BUG=563716

Review URL: https://codereview.chromium.org/1586143003

Cr-Commit-Position: refs/heads/master@{#370745}
parent a59908d2
...@@ -20,9 +20,9 @@ class TabStackTraceTest(tab_test_case.TabTestCase): ...@@ -20,9 +20,9 @@ class TabStackTraceTest(tab_test_case.TabTestCase):
self.assertIn('Thread 0 (crashed)', '\n'.join(e.stack_trace)) self.assertIn('Thread 0 (crashed)', '\n'.join(e.stack_trace))
# Currently stack traces do not work on windows: http://crbug.com/476110 # Currently stack traces do not work on windows: http://crbug.com/476110
# Currently symbols do not work on swarming: http://crbug.com/563716
# Linux stack traces depends on fission support: http://crbug.com/405623 # Linux stack traces depends on fission support: http://crbug.com/405623
@decorators.Disabled('all') @decorators.Enabled('mac')
@decorators.Disabled('snowleopard')
def testCrashSymbols(self): def testCrashSymbols(self):
try: try:
self._tab.Navigate('chrome://crash', timeout=5) self._tab.Navigate('chrome://crash', timeout=5)
......
...@@ -47,7 +47,12 @@ def GetSymbolBinary(executable, os_name): ...@@ -47,7 +47,12 @@ def GetSymbolBinary(executable, os_name):
'Chromium Framework.framework', 'Chromium Framework.framework',
'Chromium Framework') 'Chromium Framework')
if os.path.isfile(framework_file): if os.path.isfile(framework_file):
return framework_file # Sometimes dyld returns symbols for a different file. Emulate what it
# does here by using the same mechanism to find the binary file.
import fcntl
F_GETPATH = 50
with open(framework_file, 'rb') as f:
return fcntl.fcntl(f.fileno(), F_GETPATH, b'\0' * 1024).rstrip(b'\0')
return executable return executable
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment