diff options
| -rw-r--r-- | lldb/test/lang/objc/foundation/TestObjCMethods.py | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods.py b/lldb/test/lang/objc/foundation/TestObjCMethods.py index 7d9a635b78d..7f9ecafcd51 100644 --- a/lldb/test/lang/objc/foundation/TestObjCMethods.py +++ b/lldb/test/lang/objc/foundation/TestObjCMethods.py @@ -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(). |

