2 Test lldb Python commands.
7 from lldbsuite
.test
.lldbtest
import *
10 class CommandScriptAliasTestCase(TestBase
):
11 NO_DEBUG_INFO_TESTCASE
= True
14 self
.runCmd("command script import tcsacmd.py")
15 self
.runCmd("command script add -f tcsacmd.some_command_here attach")
17 # This is the function to remove the custom commands in order to have a
18 # clean slate for the next test case.
20 self
.runCmd("command script delete attach", check
=False)
22 # Execute the cleanup function during test case tear down.
23 self
.addTearDownHook(cleanup
)
25 # We don't want to display the stdout if not in TraceOn() mode.
26 if not self
.TraceOn():
29 self
.expect("attach a", substrs
=["Victory is mine"])
30 self
.runCmd("command script delete attach")
31 # this can't crash but we don't care whether the actual attach works
32 self
.runCmd("attach noprocessexistswiththisname", check
=False)