Add cleanups for 'command script add' to TestCommandPython.py.

llvm-svn: 141790
This commit is contained in:
Johnny Chen 2011-10-12 17:50:41 +00:00
parent 25ea08ef8c
commit 04a101d475
1 changed files with 10 additions and 0 deletions

View File

@ -27,6 +27,16 @@ class CmdPythonTestCase(TestBase):
self.runCmd("command source py_import")
# This is the function to remove the custom commands in order to have a
# clean slate for the next test case.
def cleanup():
self.runCmd('command script delete welcome', check=False)
self.runCmd('command script delete targetname', check=False)
self.runCmd('command script delete longwait', check=False)
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
# We don't want to display the stdout if not in TraceOn() mode.
if not self.TraceOn():
self.HideStdout()