diff options
Diffstat (limited to 'lldb/test/macosx')
7 files changed, 16 insertions, 53 deletions
diff --git a/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py b/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py index 3907e445da2..5dae2a06c83 100644 --- a/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py +++ b/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py @@ -1,7 +1,8 @@ """Test that the 'add-dsym', aka 'target symbols add', succeeds in the middle of debug session.""" +import lldb_shared + import os, time -import unittest2 import lldb import sys from lldbtest import * @@ -40,9 +41,3 @@ class AddDsymMidExecutionCommandCase(TestBase): self.expect("frame select", substrs = ['a.out`main at main.c']) - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py b/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py index 3ff481f86f9..6e739f599b1 100644 --- a/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py +++ b/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py @@ -2,8 +2,9 @@ Test that clang produces the __apple accelerator tables, for example, __apple_types, correctly. """ +import lldb_shared + import os, time -import unittest2 import lldb from lldbtest import * from lldbutil import symbol_type_to_str @@ -62,10 +63,3 @@ class AppleTypesTestCase(TestBase): self.assertTrue(dwarf_section.FindSubSection("__apple_names") and dwarf_section.FindSubSection("__apple_namespac") and dwarf_section.FindSubSection("__apple_objc")) - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/macosx/indirect_symbol/TestIndirectSymbols.py b/lldb/test/macosx/indirect_symbol/TestIndirectSymbols.py index c28d0473ee3..7f1fabc1428 100644 --- a/lldb/test/macosx/indirect_symbol/TestIndirectSymbols.py +++ b/lldb/test/macosx/indirect_symbol/TestIndirectSymbols.py @@ -1,7 +1,8 @@ """Test stepping and setting breakpoints in indirect and re-exported symbols.""" +import lldb_shared + import os, time -import unittest2 import lldb import lldbutil from lldbtest import * @@ -83,11 +84,3 @@ class TestIndirectFunctions(TestBase): self.assertTrue (len(threads) == 1, "Stopped at breakpoint in reexported function target.") curr_function = thread.GetFrameAtIndex(0).GetFunctionName() self.assertTrue (curr_function == "call_through_indirect_hidden", "Stepped into indirect symbols.") - - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/macosx/order/TestOrderFile.py b/lldb/test/macosx/order/TestOrderFile.py index d8b7f37f26b..b0d9fd93586 100644 --- a/lldb/test/macosx/order/TestOrderFile.py +++ b/lldb/test/macosx/order/TestOrderFile.py @@ -2,9 +2,10 @@ Test that debug symbols have the correct order as specified by the order file. """ +import lldb_shared + import os, time import re -import unittest2 import lldb from lldbtest import * @@ -31,9 +32,3 @@ class OrderFileTestCase(TestBase): "Symbols have correct order by the order file") self.runCmd("run", RUN_COMPLETED) - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/macosx/queues/TestQueues.py b/lldb/test/macosx/queues/TestQueues.py index b15c38aa096..82149e35443 100644 --- a/lldb/test/macosx/queues/TestQueues.py +++ b/lldb/test/macosx/queues/TestQueues.py @@ -1,7 +1,9 @@ """Test queues inspection SB APIs.""" -import os, time +import lldb_shared + import unittest2 +import os, time import lldb import lldbutil from lldbtest import * @@ -237,9 +239,3 @@ class TestQueues(TestBase): self.assertTrue(queue_performer_2.GetPendingItemAtIndex(9998).IsValid(), "queue 2's pending item #9998 is valid") self.assertTrue(queue_performer_2.GetPendingItemAtIndex(9998).GetAddress().GetSymbol().GetName() == "doing_the_work_2", "queue 2's pending item #0 should be doing_the_work_2") self.assertTrue(queue_performer_2.GetPendingItemAtIndex(9999).IsValid() == False, "queue 2's pending item #9999 is invalid") - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/macosx/safe-to-func-call/TestSafeFuncCalls.py b/lldb/test/macosx/safe-to-func-call/TestSafeFuncCalls.py index 8299bd28429..6e777904df3 100644 --- a/lldb/test/macosx/safe-to-func-call/TestSafeFuncCalls.py +++ b/lldb/test/macosx/safe-to-func-call/TestSafeFuncCalls.py @@ -1,7 +1,8 @@ """Test function call thread safety.""" +import lldb_shared + import os, time -import unittest2 import lldb import lldbutil from lldbtest import * @@ -58,9 +59,3 @@ class TestSafeFuncCalls(TestBase): def safe_to_call_func_on_select_thread (self, select_thread): self.assertTrue(select_thread.SafeToCallFunctions() == False, "It is not safe to call functions on the select thread") - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/macosx/universal/TestUniversal.py b/lldb/test/macosx/universal/TestUniversal.py index 7c3decfa92c..9628c538587 100644 --- a/lldb/test/macosx/universal/TestUniversal.py +++ b/lldb/test/macosx/universal/TestUniversal.py @@ -1,7 +1,9 @@ """Test aspects of lldb commands on universal binaries.""" -import os, time +import lldb_shared + import unittest2 +import os, time import lldb from lldbtest import * import lldbutil @@ -101,10 +103,3 @@ class UniversalTestCase(TestBase): substrs = ['Name: eax']) self.runCmd("continue") - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() |