From 89a214eaf10bb83082c5bed8805c4bbdd4145e09 Mon Sep 17 00:00:00 2001 From: Michal Gorny Date: Tue, 30 Jul 2019 07:47:22 +0000 Subject: [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 --- .../lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch') diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py index 16d8557be2e..77c67c8f240 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py @@ -68,7 +68,8 @@ class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase): 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 @@ class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase): 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, -- cgit v1.2.3