[Lldb-commits] [lldb] r198984 - Make sure to cleanup the "dwarf-lookups.txt" log file.

Greg Clayton gclayton at apple.com
Fri Jan 10 16:54:56 PST 2014


Author: gclayton
Date: Fri Jan 10 18:54:56 2014
New Revision: 198984

URL: http://llvm.org/viewvc/llvm-project?rev=198984&view=rev
Log:
Make sure to cleanup the "dwarf-lookups.txt" log file.


Modified:
    lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py

Modified: lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py?rev=198984&r1=198983&r2=198984&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py (original)
+++ lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py Fri Jan 10 18:54:56 2014
@@ -137,10 +137,16 @@ class FoundationTestCase(TestBase):
         self.runCmd("run", RUN_SUCCEEDED)
 
         # Log any DWARF lookups
-        logfile = "dwarf-lookups.txt"
+        logfile = os.path.join(os.getcwd(), "dwarf-lookups.txt")
         self.runCmd("log enable -f %s dwarf lookups" % (logfile))
         self.runCmd("expr self")
         self.runCmd("log disable dwarf lookups")
+        
+        def cleanup():
+            sys.unlink (logfile)
+        
+        self.addTearDownHook(cleanup)
+        
         f = open(logfile)
         lines = f.readlines()
         num_errors = 0





More information about the lldb-commits mailing list