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/expression_command/call-function | |
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/expression_command/call-function')
3 files changed, 6 insertions, 22 deletions
diff --git a/lldb/test/expression_command/call-function/TestCallStdStringFunction.py b/lldb/test/expression_command/call-function/TestCallStdStringFunction.py index ca09285858e..736af5b6334 100644 --- a/lldb/test/expression_command/call-function/TestCallStdStringFunction.py +++ b/lldb/test/expression_command/call-function/TestCallStdStringFunction.py @@ -2,7 +2,8 @@ Test calling std::String member functions. """ -import unittest2 +import lldb_shared + import lldb import lldbutil from lldbtest import * @@ -38,9 +39,3 @@ class ExprCommandCallFunctionTestCase(TestBase): # const char *, and thus don't invoke the Summary formatter. self.expect("print str.c_str()", substrs = ['Hello world']) - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/expression_command/call-function/TestCallStopAndContinue.py b/lldb/test/expression_command/call-function/TestCallStopAndContinue.py index 1f34ad3addc..10a4c21d0a8 100644 --- a/lldb/test/expression_command/call-function/TestCallStopAndContinue.py +++ b/lldb/test/expression_command/call-function/TestCallStopAndContinue.py @@ -2,7 +2,8 @@ Test calling a function, stopping in the call, continue and gather the result on stop. """ -import unittest2 +import lldb_shared + import lldb import lldbutil from lldbtest import * @@ -41,9 +42,3 @@ class ExprCommandCallStopContinueTestCase(TestBase): self.expect ("thread list", substrs = ['stop reason = User Expression thread plan', r'Completed expression: (Five) $0 = (number = 5, name = "five")']) - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() diff --git a/lldb/test/expression_command/call-function/TestCallUserDefinedFunction.py b/lldb/test/expression_command/call-function/TestCallUserDefinedFunction.py index c71f901d69f..c9a1db2b427 100644 --- a/lldb/test/expression_command/call-function/TestCallUserDefinedFunction.py +++ b/lldb/test/expression_command/call-function/TestCallUserDefinedFunction.py @@ -7,7 +7,8 @@ Note: """ -import unittest2 +import lldb_shared + import lldb import lldbutil from lldbtest import * @@ -47,10 +48,3 @@ class ExprCommandCallUserDefinedFunction(TestBase): # Test function with pointer paramter self.expect("exp stringCompare((const char*) \"Hello world\")", substrs = ['$4 = true']) self.expect("exp stringCompare((const char*) \"Hellworld\")", substrs = ['$5 = false']) - - -if __name__ == '__main__': - import atexit - lldb.SBDebugger.Initialize() - atexit.register(lambda: lldb.SBDebugger.Terminate()) - unittest2.main() |