[Lldb-commits] [PATCH] D65432: [lldb] [test/lldb-vscode] Use realpath to match vscode behavior
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 30 00:14:35 PDT 2019
mgorny created this revision.
mgorny added reviewers: aadsm, krytarowski, xiaobai, jfb.
Herald added a subscriber: dexonsmith.
mgorny added a comment.
FTR, the failure fixed by this is: http://lab.llvm.org:8011/builders/netbsd-amd64/builds/21195/steps/run%20unit%20tests/logs/FAIL%3A%20lldb-Suite%3A%3ATestVSCode_launch.py
Compare the directory paths returned by lldb-vscode against realpaths
rather than apparent paths. This matches lldb-vscode behavior
and therefore fixes test failures when one of the parent directories
of the source tree is a symlink.
https://reviews.llvm.org/D65432
Files:
lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
Index: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
+++ lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
@@ -68,7 +68,8 @@
directory.
'''
program = self.getBuildArtifact("a.out")
- program_parent_dir = os.path.split(os.path.split(program)[0])[0]
+ program_parent_dir = os.path.realpath(
+ os.path.split(os.path.split(program)[0])[0])
self.build_and_launch(program,
cwd=program_parent_dir)
self.continue_to_exit()
@@ -96,7 +97,8 @@
the lldb-vscode debug adaptor.
'''
program = self.getBuildArtifact("a.out")
- program_parent_dir = os.path.split(os.path.split(program)[0])[0]
+ program_parent_dir = os.path.realpath(
+ os.path.split(os.path.split(program)[0])[0])
commands = ['platform shell echo cwd = $PWD']
self.build_and_launch(program,
debuggerRoot=program_parent_dir,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65432.212280.patch
Type: text/x-patch
Size: 1206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190730/e13710ee/attachment.bin>
More information about the lldb-commits
mailing list