Skip to content
Permalink
Browse files

[lldb] [test/lldb-vscode] Use realpath to match vscode behavior

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.

Differential Revision: https://reviews.llvm.org/D65432

llvm-svn: 367291
  • Loading branch information...
mgorny committed Jul 30, 2019
1 parent 71e32ac commit 89a214eaf10bb83082c5bed8805c4bbdd4145e09
@@ -68,7 +68,8 @@ def test_cwd(self):
directory.
'''
program = self.getBuildArtifact("a.out")
program_parent_dir = os.path.dirname(os.path.dirname(program))
program_parent_dir = os.path.realpath(
os.path.dirname(os.path.dirname(program)))
self.build_and_launch(program,
cwd=program_parent_dir)
self.continue_to_exit()
@@ -96,7 +97,8 @@ def test_debuggerRoot(self):
the lldb-vscode debug adaptor.
'''
program = self.getBuildArtifact("a.out")
program_parent_dir = os.path.dirname(os.path.dirname(program))
program_parent_dir = os.path.realpath(
os.path.dirname(os.path.dirname(program)))
commands = ['platform shell echo cwd = $PWD']
self.build_and_launch(program,
debuggerRoot=program_parent_dir,

0 comments on commit 89a214e

Please sign in to comment.
You can’t perform that action at this time.