summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py33
1 files changed, 28 insertions, 5 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py b/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py
index 20343efb690..4b7a0805207 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py
@@ -22,20 +22,25 @@ class targetCommandTestCase(TestBase):
self.line_b = line_number('b.c', '// Set break point at this line.')
self.line_c = line_number('c.c', '// Set break point at this line.')
- def test_target_command(self):
- """Test some target commands: create, list, select."""
+ def buildB(self):
+ db = {'C_SOURCES': 'b.c', 'EXE': self.getBuildArtifact('b.out')}
+ self.build(dictionary=db)
+ self.addTearDownCleanup(dictionary=db)
+
+ def buildAll(self):
da = {'C_SOURCES': 'a.c', 'EXE': self.getBuildArtifact('a.out')}
self.build(dictionary=da)
self.addTearDownCleanup(dictionary=da)
- db = {'C_SOURCES': 'b.c', 'EXE': self.getBuildArtifact('b.out')}
- self.build(dictionary=db)
- self.addTearDownCleanup(dictionary=db)
+ self.buildB()
dc = {'C_SOURCES': 'c.c', 'EXE': self.getBuildArtifact('c.out')}
self.build(dictionary=dc)
self.addTearDownCleanup(dictionary=dc)
+ def test_target_command(self):
+ """Test some target commands: create, list, select."""
+ self.buildAll()
self.do_target_command()
def test_target_variable_command(self):
@@ -270,3 +275,21 @@ class targetCommandTestCase(TestBase):
substrs=[
"my_global_char",
"'X'"])
+
+ @no_debug_info_test
+ def test_target_stop_hook_disable_enable(self):
+ self.buildB()
+ self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+
+ self.expect("target stop-hook disable 1", error=True, substrs=['unknown stop hook id: "1"'])
+ self.expect("target stop-hook disable blub", error=True, substrs=['invalid stop hook id: "blub"'])
+ self.expect("target stop-hook enable 1", error=True, substrs=['unknown stop hook id: "1"'])
+ self.expect("target stop-hook enable blub", error=True, substrs=['invalid stop hook id: "blub"'])
+
+ @no_debug_info_test
+ def test_target_stop_hook_delete(self):
+ self.buildB()
+ self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+
+ self.expect("target stop-hook delete 1", error=True, substrs=['unknown stop hook id: "1"'])
+ self.expect("target stop-hook delete blub", error=True, substrs=['invalid stop hook id: "blub"'])
OpenPOWER on IntegriCloud