summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/command_script/TestCommandScript.py
diff options
context:
space:
mode:
authorEnrico Granata <granata.enrico@gmail.com>2011-11-07 22:57:04 +0000
committerEnrico Granata <granata.enrico@gmail.com>2011-11-07 22:57:04 +0000
commit0a305db796fcd8b0cb6e3f7918de24f0753e2708 (patch)
treeb004601a03a562bdd4be760ac8871bc848365315 /lldb/test/functionalities/command_script/TestCommandScript.py
parent55a86d32d381a077f7a7356182cae1cdb4dd44df (diff)
downloadbcm5719-llvm-0a305db796fcd8b0cb6e3f7918de24f0753e2708.tar.gz
bcm5719-llvm-0a305db796fcd8b0cb6e3f7918de24f0753e2708.zip
this patch addresses several issues with "command script" subcommands:
a) adds a new --synchronicity (-s) setting for "command script add" that allows the user to decide if scripted commands should run synchronously or asynchronously (which can make a difference in how events are handled) b) clears up several error messages c) adds a new --allow-reload (-r) setting for "command script import" that allows the user to reload a module even if it has already been imported before d) allows filename completion for "command script import" (much like what happens for "target create") e) prevents "command script add" from replacing built-in commands with scripted commands f) changes AddUserCommand() to take an std::string instead of a const char* (for performance reasons) plus, it fixes an issue in "type summary add" command handling which caused several test suite errors llvm-svn: 144035
Diffstat (limited to 'lldb/test/functionalities/command_script/TestCommandScript.py')
-rw-r--r--lldb/test/functionalities/command_script/TestCommandScript.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/lldb/test/functionalities/command_script/TestCommandScript.py b/lldb/test/functionalities/command_script/TestCommandScript.py
index 5064377b842..c381e4985a9 100644
--- a/lldb/test/functionalities/command_script/TestCommandScript.py
+++ b/lldb/test/functionalities/command_script/TestCommandScript.py
@@ -33,6 +33,10 @@ class CmdPythonTestCase(TestBase):
self.runCmd('command script delete welcome', check=False)
self.runCmd('command script delete targetname', check=False)
self.runCmd('command script delete longwait', check=False)
+ self.runCmd('command script delete mysto', check=False)
+ self.runCmd('command script delete tell_sync', check=False)
+ self.runCmd('command script delete tell_async', check=False)
+ self.runCmd('command script delete tell_curr', check=False)
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
@@ -83,12 +87,34 @@ class CmdPythonTestCase(TestBase):
self.expect("longwait",
substrs = ['Done; if you saw the delays I am doing OK'])
+ self.runCmd("b main")
+ self.runCmd("run")
+ self.runCmd("mysto 3")
+ self.expect("frame variable array",
+ substrs = ['[0] = 79630','[1] = 388785018','[2] = 0'])
+ self.runCmd("mysto 3")
+ self.expect("frame variable array",
+ substrs = ['[0] = 79630','[4] = 388785018','[5] = 0'])
+
+# we cannot use the stepover command to check for async execution mode since LLDB
+# seems to get confused when events start to queue up
+ self.expect("tell_sync",
+ substrs = ['running sync'])
+ self.expect("tell_async",
+ substrs = ['running async'])
+ self.expect("tell_curr",
+ substrs = ['I am running','sync'])
+
+
self.runCmd("command script clear")
self.expect('command script list', matching=False,
substrs = ['targetname',
'longwait'])
+ self.expect('command script add -f foobar frame', error=True,
+ substrs = ['cannot add command'])
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
OpenPOWER on IntegriCloud