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,
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,
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits