summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/value
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-10-22 20:06:20 +0000
committerZachary Turner <zturner@google.com>2015-10-22 20:06:20 +0000
commit77db4a855239049488e09f28c6665fdb3b51ef90 (patch)
tree11f22a87f27e28b3a71914ee3d80a039a79d2c9a /lldb/test/python_api/value
parentbd832d513156cea8645f1c3da1296f791edfbbab (diff)
downloadbcm5719-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/python_api/value')
-rw-r--r--lldb/test/python_api/value/TestValueAPI.py9
-rw-r--r--lldb/test/python_api/value/change_values/TestChangeValueAPI.py9
-rw-r--r--lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py9
3 files changed, 6 insertions, 21 deletions
diff --git a/lldb/test/python_api/value/TestValueAPI.py b/lldb/test/python_api/value/TestValueAPI.py
index 3c67d69e225..e6d8825c530 100644
--- a/lldb/test/python_api/value/TestValueAPI.py
+++ b/lldb/test/python_api/value/TestValueAPI.py
@@ -2,9 +2,10 @@
Test some SBValue APIs.
"""
+import lldb_shared
+
import os, time
import re
-import unittest2
import lldb, lldbutil
from lldbtest import *
@@ -129,9 +130,3 @@ class ValueAPITestCase(TestBase):
val_a = target.EvaluateExpression('a')
self.assertTrue(val_s.GetChildMemberWithName('a').AddressOf(), VALID_VARIABLE)
self.assertTrue(val_a.Cast(val_i.GetType()).AddressOf(), VALID_VARIABLE)
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
diff --git a/lldb/test/python_api/value/change_values/TestChangeValueAPI.py b/lldb/test/python_api/value/change_values/TestChangeValueAPI.py
index dd30c9d4087..0b326b945e1 100644
--- a/lldb/test/python_api/value/change_values/TestChangeValueAPI.py
+++ b/lldb/test/python_api/value/change_values/TestChangeValueAPI.py
@@ -2,9 +2,10 @@
Test some SBValue APIs.
"""
+import lldb_shared
+
import os, time
import re
-import unittest2
import lldb, lldbutil
from lldbtest import *
@@ -142,9 +143,3 @@ class ChangeValueAPITestCase(TestBase):
self.assertTrue(thread == None, "We should not have managed to hit our second breakpoint with sp == 1")
process.Kill()
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
diff --git a/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py b/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py
index 2329c96fe61..8270ed8fffe 100644
--- a/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py
+++ b/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py
@@ -3,9 +3,10 @@ Test SBValue API linked_list_iter which treats the SBValue as a linked list and
supports iteration till the end of list is reached.
"""
+import lldb_shared
+
import os, time
import re
-import unittest2
import lldb, lldbutil
from lldbtest import *
@@ -127,9 +128,3 @@ class ValueAsLinkedListTestCase(TestBase):
list.append(int(t.GetChildMemberWithName("id").GetValue()))
self.assertTrue(len(list) == 3)
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
OpenPOWER on IntegriCloud