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