[Lldb-commits] [lldb] r213111 - TestObjCMethods.FoundationTestCase was failing due to an error, fixed now.

Greg Clayton gclayton at apple.com
Tue Jul 15 17:39:17 PDT 2014


Author: gclayton
Date: Tue Jul 15 19:39:15 2014
New Revision: 213111

URL: http://llvm.org/viewvc/llvm-project?rev=213111&view=rev
Log:
TestObjCMethods.FoundationTestCase was failing due to an error, fixed now.

<rdar://problem/16322133>
llvm.org/pr20267


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=213111&r1=213110&r2=213111&view=diff
==============================================================================
--- lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py (original)
+++ lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py Tue Jul 15 19:39:15 2014
@@ -10,6 +10,7 @@ import string
 from lldbtest import *
 import lldbutil
 
+file_index = 0
 @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
 class FoundationTestCase(TestBase):
 
@@ -119,7 +120,6 @@ class FoundationTestCase(TestBase):
         self.expression_lookups_objc()
 
     @dwarf_test
-    @expectedFailureDarwin("llvm.org/pr20267")
     def test_expression_lookups_objc_dwarf(self):
         """Test running an expression detect spurious debug info lookups (DWARF)."""
         self.buildDwarf()
@@ -135,8 +135,10 @@ class FoundationTestCase(TestBase):
 
         self.runCmd("run", RUN_SUCCEEDED)
 
+        global file_index
         # Log any DWARF lookups
-        logfile = os.path.join(os.getcwd(), "dwarf-lookups-" + self.getArchitecture() + ".txt")
+        ++file_index
+        logfile = os.path.join(os.getcwd(), "dwarf-lookups-" + self.getArchitecture() + "-" + str(file_index) + ".txt")
         self.runCmd("log enable -f %s dwarf lookups" % (logfile))
         self.runCmd("expr self")
         self.runCmd("log disable dwarf lookups")
@@ -147,17 +149,18 @@ class FoundationTestCase(TestBase):
         
         self.addTearDownHook(cleanup)
         
-        f = open(logfile)
-        lines = f.readlines()
-        num_errors = 0
-        for line in lines:
-            if string.find(line, "$__lldb") != -1:
-                if num_errors == 0:
-                    print "error: found spurious name lookups when evaluating an expression:"
-                num_errors += 1
-                print line,
-        self.assertTrue(num_errors == 0, "Spurious lookups detected")
-        f.close()
+        if os.path.exists (logfile):
+            f = open(logfile)
+            lines = f.readlines()
+            num_errors = 0
+            for line in lines:
+                if string.find(line, "$__lldb") != -1:
+                    if num_errors == 0:
+                        print "error: found spurious name lookups when evaluating an expression:"
+                    num_errors += 1
+                    print line,
+            self.assertTrue(num_errors == 0, "Spurious lookups detected")
+            f.close()
 
     def setUp(self):
         # Call super's setUp().





More information about the lldb-commits mailing list