[Lldb-commits] [lldb] 06ea05a - [lldb/test] Fix TestDSYMSourcePathRemapping in the presence of symlnks

Fred Riss via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 6 19:54:26 PDT 2020


Author: Fred Riss
Date: 2020-04-06T19:50:34-07:00
New Revision: 06ea05a3fbc6e70cd4c492cced363a8630d65c6a

URL: https://github.com/llvm/llvm-project/commit/06ea05a3fbc6e70cd4c492cced363a8630d65c6a
DIFF: https://github.com/llvm/llvm-project/commit/06ea05a3fbc6e70cd4c492cced363a8630d65c6a.diff

LOG: [lldb/test] Fix TestDSYMSourcePathRemapping in the presence of symlnks

My main work directory is on a separate partition, but I usually access
it through a symlink in my home directory. When running the tests,
either Clang or make resolves the symlink, and the real path of the
test directory ends up in the debug information.

This confuses this test as LLDB is trying to remap the real path, but
the remapping description uses the path with the symlink in
it. Calling realpath on the source path when constructing the
remapping description fixes it.

Added: 
    

Modified: 
    lldb/test/API/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py b/lldb/test/API/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
index 0f5daf51e975..5075868e9c1a 100644
--- a/lldb/test/API/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
+++ b/lldb/test/API/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
@@ -42,7 +42,7 @@ def build(self):
             f.write('<dict>\n')
             f.write('  <key>DBGSourcePathRemapping</key>\n')
             f.write('  <dict>\n')
-            f.write('    <key>' + botdir + '</key>\n')
+            f.write('    <key>' + os.path.realpath(botdir) + '</key>\n')
             f.write('    <string>' + userdir + '</string>\n')
             f.write('  </dict>\n')
             f.write('</dict>\n')


        


More information about the lldb-commits mailing list