summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2019-07-30 07:47:22 +0000
committerMichal Gorny <mgorny@gentoo.org>2019-07-30 07:47:22 +0000
commit89a214eaf10bb83082c5bed8805c4bbdd4145e09 (patch)
tree927d5341903ed86e349e5ff11801cd2c9fed0af7 /lldb/packages/Python/lldbsuite/test
parent71e32aca46d122c801a7db58a0d84d387fa80b29 (diff)
downloadbcm5719-llvm-89a214eaf10bb83082c5bed8805c4bbdd4145e09.tar.gz
bcm5719-llvm-89a214eaf10bb83082c5bed8805c4bbdd4145e09.zip
[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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py6
1 files changed, 4 insertions, 2 deletions
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,
OpenPOWER on IntegriCloud