summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2018-12-19 08:57:10 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2018-12-19 08:57:10 +0000
commit9a33a15766e1551f8f2213a1900e7a0aee3fb78b (patch)
tree07b43fd00774e596bfff748d2eba4041eb42d2d5 /lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options
parent2a632b6472e55fb2ae049ee2be3933a479753ddb (diff)
downloadbcm5719-llvm-9a33a15766e1551f8f2213a1900e7a0aee3fb78b.tar.gz
bcm5719-llvm-9a33a15766e1551f8f2213a1900e7a0aee3fb78b.zip
refactor testsuite spawnLldbMi args->exe+args
Currently spawnLldbMi accepts both lldb-mi options and executable to debug as a single parameter. Split them. As in D55859 we will need to execute one lldb-mi command before loading the exe. Therefore we can no longer use the exe as lldb-mi command-line parameter as then there is no way to execute a command before loading exe specified as lldb-mi command-line parameter. LocateExecutableSymbolFileDsym should be static, that is also a little refactorization. Differential Revision: https://reviews.llvm.org/D55858 llvm-svn: 349607
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options')
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
index 467952db7eb..c4cdcbd6497 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
@@ -22,7 +22,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase):
def test_lldbmi_executable_option_file(self):
"""Test that 'lldb-mi --interpreter %s' loads executable file."""
- self.spawnLldbMi(args="%s" % self.myexe)
+ self.spawnLldbMi(exe=self.myexe)
# Test that the executable is loaded when file was specified
self.expect("-file-exec-and-symbols \"%s\"" % self.myexe)
@@ -52,7 +52,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase):
# Prepare path to executable
path = "unknown_file"
- self.spawnLldbMi(args="%s" % path)
+ self.spawnLldbMi(exe=path)
# Test that the executable isn't loaded when unknown file was specified
self.expect("-file-exec-and-symbols \"%s\"" % path)
@@ -71,7 +71,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase):
"""Test that 'lldb-mi --interpreter %s' loads executable which is specified via absolute path."""
# Prepare path to executable
- self.spawnLldbMi(args="%s" % self.myexe)
+ self.spawnLldbMi(exe=self.myexe)
# Test that the executable is loaded when file was specified using
# absolute path
@@ -95,7 +95,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase):
# Prepare path to executable
path = os.path.relpath(self.myexe, self.getBuildDir())
- self.spawnLldbMi(args="%s" % path)
+ self.spawnLldbMi(exe=path)
# Test that the executable is loaded when file was specified using
# relative path
@@ -119,7 +119,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase):
# Prepare path to executable
path = "unknown_dir" + self.myexe
- self.spawnLldbMi(args="%s" % path)
+ self.spawnLldbMi(exe=path)
# Test that the executable isn't loaded when file was specified using
# unknown path
@@ -259,7 +259,7 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase):
"""Test that 'lldb-mi --log' creates a log file in the current directory."""
logDirectory = self.getBuildDir()
- self.spawnLldbMi(args="%s --log" % self.myexe)
+ self.spawnLldbMi(exe=self.myexe, args="--log")
# Test that the executable is loaded when file was specified
self.expect("-file-exec-and-symbols \"%s\"" % self.myexe)
@@ -296,9 +296,8 @@ class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase):
import tempfile
logDirectory = tempfile.gettempdir()
- self.spawnLldbMi(
- args="%s --log --log-dir=%s" %
- (self.myexe, logDirectory))
+ self.spawnLldbMi(exe=self.myexe,
+ args="--log --log-dir=%s" % logDirectory)
# Test that the executable is loaded when file was specified
self.expect("-file-exec-and-symbols \"%s\"" % self.myexe)
OpenPOWER on IntegriCloud