summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2018-03-06 23:25:04 +0000
committerAdrian Prantl <aprantl@apple.com>2018-03-06 23:25:04 +0000
commitbff272faa9d09689dfaa49c9018c5dba621019c6 (patch)
tree067c28cd3a13edbbb158dd97518120351cd697ee /lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
parent5701606165bd281a6d96db0b933533dc4dd84ae0 (diff)
downloadbcm5719-llvm-bff272faa9d09689dfaa49c9018c5dba621019c6.tar.gz
bcm5719-llvm-bff272faa9d09689dfaa49c9018c5dba621019c6.zip
Add test for lldb-mi interpreter
Test that "lldb-mi --interpreter" can interpret "target list" CLI command. Patch by Alex Polyakov! Differential Revision: https://reviews.llvm.org/D44040 llvm-svn: 326847
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
index 2f207928db7..100388e98ef 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
@@ -36,6 +36,25 @@ class MiInterpreterExecTestCase(lldbmi_testcase.MiTestCaseBase):
self.expect("\^running")
self.expect("\*stopped,reason=\"breakpoint-hit\"")
+ @skipIfRemote # We do not currently support remote debugging via the MI.
+ @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows.
+ @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races.
+ def test_lldbmi_target_list(self):
+ """Test that 'lldb-mi --interpreter' can list targets by 'target list' command."""
+
+ self.spawnLldbMi(args=None)
+
+ # Test that initially there are no targets.
+ self.runCmd("-interpreter-exec console \"target list\"")
+ self.expect(r"~\"No targets.\\n\"")
+
+ # Add target.
+ self.runCmd("-file-exec-and-symbols %s" % self.myexe)
+
+ # Test that "target list" lists added target.
+ self.runCmd("-interpreter-exec console \"target list\"")
+ self.expect(r"~\"Current targets:\\n\* target #0: %s" % self.myexe)
+
@skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows
@skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
@skipIfRemote # We do not currently support remote debugging via the MI.
OpenPOWER on IntegriCloud