diff options
author | Michal Gorny <mgorny@gentoo.org> | 2019-07-30 07:47:16 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2019-07-30 07:47:16 +0000 |
commit | 71e32aca46d122c801a7db58a0d84d387fa80b29 (patch) | |
tree | 102ed4855e009edfe08c00dcd9cca0f3694303bf /lldb/packages/Python/lldbsuite/test | |
parent | 8e0cf076aca8e9c23919d1c8398826ab91a88560 (diff) | |
download | bcm5719-llvm-71e32aca46d122c801a7db58a0d84d387fa80b29.tar.gz bcm5719-llvm-71e32aca46d122c801a7db58a0d84d387fa80b29.zip |
[lldb] [test/lldb-vscode] Use os.path.dirname() [NFC]
Replace os.path.split()[0] with os.path.dirname(). Suggested by Pavel
Labath in D65432.
llvm-svn: 367290
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py | 10 |
1 files changed, 5 insertions, 5 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 5c996fbee45..16d8557be2e 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,7 @@ class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase): directory. ''' program = self.getBuildArtifact("a.out") - program_parent_dir = os.path.split(os.path.split(program)[0])[0] + program_parent_dir = os.path.dirname(os.path.dirname(program)) self.build_and_launch(program, cwd=program_parent_dir) self.continue_to_exit() @@ -96,7 +96,7 @@ class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase): 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.dirname(os.path.dirname(program)) commands = ['platform shell echo cwd = $PWD'] self.build_and_launch(program, debuggerRoot=program_parent_dir, @@ -124,7 +124,7 @@ class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase): Tests the "sourcePath" will set the target.source-map. ''' program = self.getBuildArtifact("a.out") - program_dir = os.path.split(program)[0] + program_dir = os.path.dirname(program) self.build_and_launch(program, sourcePath=program_dir) output = self.get_console() @@ -170,7 +170,7 @@ class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase): enabled. ''' program = self.getBuildArtifact("a.out") - program_dir = os.path.split(program)[0] + program_dir = os.path.dirname(program) glob = os.path.join(program_dir, '*.out') self.build_and_launch(program, args=[glob], shellExpandArguments=True) self.continue_to_exit() @@ -195,7 +195,7 @@ class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase): disabled. ''' program = self.getBuildArtifact("a.out") - program_dir = os.path.split(program)[0] + program_dir = os.path.dirname(program) glob = os.path.join(program_dir, '*.out') self.build_and_launch(program, args=[glob], |