TestObjCMethods.FoundationTestCase was failing due to an error, fixed now.

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

llvm-svn: 213111
This commit is contained in:
Greg Clayton 2014-07-16 00:39:15 +00:00
parent 641d8a06bd
commit 0d830b4226
1 changed files with 16 additions and 13 deletions

View File

@ -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().