diff options
author | Zachary Turner <zturner@google.com> | 2015-10-22 20:06:20 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-10-22 20:06:20 +0000 |
commit | 77db4a855239049488e09f28c6665fdb3b51ef90 (patch) | |
tree | 11f22a87f27e28b3a71914ee3d80a039a79d2c9a /lldb/test/functionalities/stop-hook | |
parent | bd832d513156cea8645f1c3da1296f791edfbbab (diff) | |
download | bcm5719-llvm-77db4a855239049488e09f28c6665fdb3b51ef90.tar.gz bcm5719-llvm-77db4a855239049488e09f28c6665fdb3b51ef90.zip |
Update every test to import `lldb_shared`.
This is necessary in order to allow third party modules to be
located under lldb/third_party rather than under the test
folder directly.
Since we're already touching every test file anyway, we also
go ahead and delete the unittest2 import and main block wherever
possible. The ability to run a test as a standalone file has
already been broken for some time, and if we decide we want this
back, we should use unittest instead of unittest2.
A few places could not have the import of unittest2 removed,because
they depend on the unittest2.expectedFailure or skip decorators.
Removing all those was orthogonal in spirit to the purpose of this
CL, so the import of unittest2 remains in those files that were
using it for its test decorators. Those can be addressed
separately.
llvm-svn: 251055
Diffstat (limited to 'lldb/test/functionalities/stop-hook')
3 files changed, 4 insertions, 24 deletions
diff --git a/lldb/test/functionalities/stop-hook/TestStopHookCmd.py b/lldb/test/functionalities/stop-hook/TestStopHookCmd.py index df94835e380..9158412fc5a 100644 --- a/lldb/test/functionalities/stop-hook/TestStopHookCmd.py +++ b/lldb/test/functionalities/stop-hook/TestStopHookCmd.py @@ -5,7 +5,6 @@ Test lldb target stop-hook command. import lldb_shared import os -import unittest2 import lldb from lldbtest import * import lldbutil @@ -62,10 +61,3 @@ class StopHookCmdTestCase(TestBase): self.expect('target stop-hook list', 'Stop Hook deleted successfully', substrs = ['No stop hooks.']) - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py b/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py index abb99953bc9..211c3f97cb2 100644 --- a/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py +++ b/lldb/test/functionalities/stop-hook/TestStopHookMechanism.py @@ -2,8 +2,9 @@ Test lldb target stop-hook mechanism to see whether it fires off correctly . """ +import lldb_shared + import os -import unittest2 import lldb from lldbtest import * @@ -95,10 +96,3 @@ class StopHookMechanismTestCase(TestBase): # Verify that the 'Stop Hooks' mechanism is NOT BEING fired off. self.expect(child.before, exe=False, matching=False, substrs = ['(void *) $']) - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py b/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py index 59c5222f5e1..49da3fae154 100644 --- a/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py +++ b/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py @@ -2,8 +2,9 @@ Test that lldb stop-hook works for multiple threads. """ +import lldb_shared + import os, time -import unittest2 import lldb from lldbtest import * @@ -71,10 +72,3 @@ class StopHookForMultipleThreadsTestCase(TestBase): # Continue and expect to find the output emitted by the firing of our stop hook. child.sendline('continue') child.expect_exact('(uint32_t) ::g_val = ') - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() |