[Lldb-commits] [lldb] r367290 - [lldb] [test/lldb-vscode] Use os.path.dirname() [NFC]
Michal Gorny via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 30 00:47:17 PDT 2019
Author: mgorny
Date: Tue Jul 30 00:47:16 2019
New Revision: 367290
URL: http://llvm.org/viewvc/llvm-project?rev=367290&view=rev
Log:
[lldb] [test/lldb-vscode] Use os.path.dirname() [NFC]
Replace os.path.split()[0] with os.path.dirname(). Suggested by Pavel
Labath in D65432.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py?rev=367290&r1=367289&r2=367290&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py Tue Jul 30 00:47:16 2019
@@ -68,7 +68,7 @@ class TestVSCode_launch(lldbvscode_testc
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_testc
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_testc
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_testc
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_testc
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],
More information about the lldb-commits
mailing list