Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: tools/telemetry/telemetry/internal/backends/chrome/desktop_browser_backend.py

Issue 1586143003: Enable crash symbols unit test for Mac OSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only import fcntl when needed Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/core/stacktrace_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/internal/backends/chrome/desktop_browser_backend.py
diff --git a/tools/telemetry/telemetry/internal/backends/chrome/desktop_browser_backend.py b/tools/telemetry/telemetry/internal/backends/chrome/desktop_browser_backend.py
index 041de993f34800825391013ba347014e0fc14f96..c5804cfa81305c6d672b976db61b71297b4ab28d 100644
--- a/tools/telemetry/telemetry/internal/backends/chrome/desktop_browser_backend.py
+++ b/tools/telemetry/telemetry/internal/backends/chrome/desktop_browser_backend.py
@@ -46,7 +46,12 @@ def GetSymbolBinary(executable, os_name):
'Chromium Framework.framework',
'Chromium Framework')
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
« no previous file with comments | « tools/perf/core/stacktrace_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698