[Lldb-commits] [lldb] r141790 - /lldb/trunk/test/functionalities/command_python/TestCommandPython.py

Johnny Chen johnny.chen at apple.com
Wed Oct 12 10:59:35 PDT 2011


Patch by Enrico.
On Oct 12, 2011, at 10:50 AM, Johnny Chen wrote:

> Author: johnny
> Date: Wed Oct 12 12:50:41 2011
> New Revision: 141790
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=141790&view=rev
> Log:
> Add cleanups for 'command script add' to TestCommandPython.py.
> 
> Modified:
>    lldb/trunk/test/functionalities/command_python/TestCommandPython.py
> 
> Modified: lldb/trunk/test/functionalities/command_python/TestCommandPython.py
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/command_python/TestCommandPython.py?rev=141790&r1=141789&r2=141790&view=diff
> ==============================================================================
> --- lldb/trunk/test/functionalities/command_python/TestCommandPython.py (original)
> +++ lldb/trunk/test/functionalities/command_python/TestCommandPython.py Wed Oct 12 12:50:41 2011
> @@ -27,6 +27,16 @@
> 
>         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()
> 
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list