[Lldb-commits] [lldb] r116938 - /lldb/trunk/test/lldbtest.py

Johnny Chen johnny.chen at apple.com
Wed Oct 20 11:12:58 PDT 2010


Author: johnny
Date: Wed Oct 20 13:12:58 2010
New Revision: 116938

URL: http://llvm.org/viewvc/llvm-project?rev=116938&view=rev
Log:
Clean up the teardown logic to make it more robust and to record the additions and
invocations of them into session object.

Remove a debug statement.

Modified:
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=116938&r1=116937&r2=116938&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Wed Oct 20 13:12:58 2010
@@ -475,7 +475,11 @@
 
         Hooks are executed in a first come first serve manner.
         """
-        self.hooks.append(hook)
+        if callable(hook):
+            with recording(self, traceAlways) as sbuf:
+                import inspect
+                print >> sbuf, "Adding tearDown hook:", inspect.getsource(hook)
+            self.hooks.append(hook)
 
     def tearDown(self):
         #import traceback
@@ -483,11 +487,11 @@
 
         # Check and run any hook functions.
         for hook in self.hooks:
-            #print "Executing hook:", hook
+            with recording(self, traceAlways) as sbuf:
+                import inspect
+                print >> sbuf, "Executing tearDown hook:", inspect.getsource(hook)
             hook()
 
-        self.runCmd("settings show")
-
         # Terminate the current process being debugged, if any.
         if self.runStarted:
             self.runCmd("process kill", PROCESS_KILLED, check=False)





More information about the lldb-commits mailing list