diff options
Diffstat (limited to 'lldb/test/lang/objc/foundation')
7 files changed, 15 insertions, 54 deletions
diff --git a/lldb/test/lang/objc/foundation/TestConstStrings.py b/lldb/test/lang/objc/foundation/TestConstStrings.py index a3780e09a75..772f5d7ce01 100644 --- a/lldb/test/lang/objc/foundation/TestConstStrings.py +++ b/lldb/test/lang/objc/foundation/TestConstStrings.py @@ -3,8 +3,9 @@ Test that objective-c constant strings are generated correctly by the expression parser. """ +import lldb_shared + import os, time -import unittest2 import lldb from lldbtest import * import lldbutil @@ -48,10 +49,3 @@ class ConstStringTestCase(TestBase): self.expect('expression (int)[@"123" length]', startstr = "(int) $3 = 3") - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py b/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py index 3fb67924f7d..cd03e76ad11 100644 --- a/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py +++ b/lldb/test/lang/objc/foundation/TestFoundationDisassembly.py @@ -2,8 +2,10 @@ Test the lldb disassemble command on foundation framework. """ -import os, time +import lldb_shared + import unittest2 +import os, time import lldb from lldbtest import * import lldbutil @@ -128,10 +130,3 @@ class FoundationDisassembleTestCase(TestBase): # Do the disassemble for the currently stopped function. self.runCmd("disassemble -f") - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods.py b/lldb/test/lang/objc/foundation/TestObjCMethods.py index 5be2e3c441a..1417d017a69 100644 --- a/lldb/test/lang/objc/foundation/TestObjCMethods.py +++ b/lldb/test/lang/objc/foundation/TestObjCMethods.py @@ -3,8 +3,9 @@ Set breakpoints on objective-c class and instance methods in foundation. Also lookup objective-c data types and evaluate expressions. """ +import lldb_shared + import os, os.path, time -import unittest2 import lldb import string from lldbtest import * @@ -79,7 +80,6 @@ class FoundationTestCase(TestBase): self.expect("thread backtrace", "Stop at -[NSAutoreleasePool release]", substrs = ["Foundation`-[NSAutoreleasePool release]"]) - #@unittest2.expectedFailure # rdar://problem/8542091 # rdar://problem/8492646 def test_data_type_and_expr(self): @@ -258,9 +258,3 @@ class FoundationTestCase(TestBase): print line, self.assertTrue(num_errors == 0, "Spurious lookups detected") f.close() - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods2.py b/lldb/test/lang/objc/foundation/TestObjCMethods2.py index 59eb9955c3c..9c6ce04d05a 100644 --- a/lldb/test/lang/objc/foundation/TestObjCMethods2.py +++ b/lldb/test/lang/objc/foundation/TestObjCMethods2.py @@ -2,8 +2,9 @@ Test more expression command sequences with objective-c. """ +import lldb_shared + import os, time -import unittest2 import lldb from lldbtest import * import lldbutil @@ -164,9 +165,3 @@ class FoundationTestCase2(TestBase): error = True, patterns = ["no known method", "cast the message send to the method's return type"]) self.runCmd("process continue") - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py index 08310329096..6dd9b90e201 100644 --- a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py +++ b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py @@ -2,9 +2,10 @@ Test SBValue.GetObjectDescription() with the value from SBTarget.FindGlobalVariables(). """ +import lldb_shared + import os, time import re -import unittest2 import lldb, lldbutil from lldbtest import * @@ -65,10 +66,3 @@ class ObjectDescriptionAPITestCase(TestBase): print "object description:", v.GetObjectDescription() if v.GetName() == 'my_global_str': self.assertTrue(v.GetObjectDescription() == 'This is a global string') - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/lang/objc/foundation/TestRuntimeTypes.py b/lldb/test/lang/objc/foundation/TestRuntimeTypes.py index 55e9713462f..a302fcc16e0 100644 --- a/lldb/test/lang/objc/foundation/TestRuntimeTypes.py +++ b/lldb/test/lang/objc/foundation/TestRuntimeTypes.py @@ -2,8 +2,9 @@ Test that Objective-C methods from the runtime work correctly. """ +import lldb_shared + import os, time -import unittest2 import lldb from lldbtest import * import lldbutil @@ -43,9 +44,3 @@ class RuntimeTypesTestCase(TestBase): self.expect("po $1", VARIABLES_DISPLAYED_CORRECTLY, substrs = ["foo"]) - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/lang/objc/foundation/TestSymbolTable.py b/lldb/test/lang/objc/foundation/TestSymbolTable.py index 0d238160214..3b1d820012d 100644 --- a/lldb/test/lang/objc/foundation/TestSymbolTable.py +++ b/lldb/test/lang/objc/foundation/TestSymbolTable.py @@ -2,8 +2,9 @@ Test symbol table access for main.m. """ +import lldb_shared + import os, time -import unittest2 import lldb from lldbtest import * @@ -63,10 +64,3 @@ class FoundationSymtabTestCase(TestBase): #print "symbols unaccounted for:", expected_symbols self.assertTrue(len(expected_symbols) == 0, "All the known symbols are accounted for") - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() |