diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2018-12-19 08:57:10 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2018-12-19 08:57:10 +0000 |
commit | 9a33a15766e1551f8f2213a1900e7a0aee3fb78b (patch) | |
tree | 07b43fd00774e596bfff748d2eba4041eb42d2d5 /lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py | |
parent | 2a632b6472e55fb2ae049ee2be3933a479753ddb (diff) | |
download | bcm5719-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/lldbmi_testcase.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py index 7b6ee55b250..1bcdcc19699 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py @@ -40,7 +40,7 @@ class MiTestCaseBase(Base): pass Base.tearDown(self) - def spawnLldbMi(self, args=None): + def spawnLldbMi(self, exe=None, args=None): import pexpect self.child = pexpect.spawn("%s --interpreter %s" % ( self.lldbMiExec, args if args else ""), cwd=self.getBuildDir()) @@ -49,6 +49,10 @@ class MiTestCaseBase(Base): self.child.logfile_read = open(self.mylog, "w") # wait until lldb-mi has started up and is ready to go self.expect(self.child_prompt, exactly=True) + if exe: + self.runCmd("-file-exec-and-symbols \"%s\"" % exe) + # Testcases expect to be able to match output of this command, + # see test_lldbmi_specialchars. def runCmd(self, cmd): self.child.sendline(cmd) |