summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/watchpoint
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/python_api/watchpoint')
-rw-r--r--lldb/test/python_api/watchpoint/TestSetWatchpoint.py10
-rw-r--r--lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py10
-rw-r--r--lldb/test/python_api/watchpoint/TestWatchpointIter.py10
-rw-r--r--lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py10
-rw-r--r--lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py10
-rw-r--r--lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py10
6 files changed, 12 insertions, 48 deletions
diff --git a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py
index 9e464ad363a..242b199db7d 100644
--- a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py
+++ b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py
@@ -2,9 +2,10 @@
Use lldb Python SBValue API to create a watchpoint for read_write of 'globl' var.
"""
+import lldb_shared
+
import os, time
import re
-import unittest2
import lldb, lldbutil
from lldbtest import *
@@ -87,10 +88,3 @@ class SetWatchpointAPITestCase(TestBase):
# At this point, the inferior process should have exited.
self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
-
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
index 6b4197b3d48..f8ae2a23966 100644
--- a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
+++ b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
@@ -2,9 +2,10 @@
Use lldb Python SBWatchpoint API to set the ignore count.
"""
+import lldb_shared
+
import os, time
import re
-import unittest2
import lldb, lldbutil
from lldbtest import *
@@ -83,10 +84,3 @@ class WatchpointIgnoreCountTestCase(TestBase):
self.assertTrue(watchpoint.GetWatchSize() == 4)
self.assertTrue(watchpoint.GetHitCount() == 2)
print watchpoint
-
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIter.py b/lldb/test/python_api/watchpoint/TestWatchpointIter.py
index 8a6877930ee..0ba73c0500b 100644
--- a/lldb/test/python_api/watchpoint/TestWatchpointIter.py
+++ b/lldb/test/python_api/watchpoint/TestWatchpointIter.py
@@ -2,9 +2,10 @@
Use lldb Python SBTarget API to iterate on the watchpoint(s) for the target.
"""
+import lldb_shared
+
import os, time
import re
-import unittest2
import lldb, lldbutil
from lldbtest import *
@@ -108,10 +109,3 @@ class WatchpointIteratorTestCase(TestBase):
self.assertTrue(watchpoint.GetWatchSize() == 4)
self.assertTrue(watchpoint.GetHitCount() == 1)
print watchpoint
-
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
diff --git a/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
index 041e185de54..dd7c79971e8 100644
--- a/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
+++ b/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
@@ -2,8 +2,9 @@
Test watchpoint condition API.
"""
+import lldb_shared
+
import os, time
-import unittest2
import lldb
import lldbutil
from lldbtest import *
@@ -84,10 +85,3 @@ class WatchpointConditionAPITestCase(TestBase):
# Verify that the condition is met.
self.assertTrue(value.GetValueAsUnsigned() == 5)
-
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
index 9830dd19777..51a8955b689 100644
--- a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
+++ b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
@@ -2,9 +2,10 @@
Use lldb Python SBValue.WatchPointee() API to create a watchpoint for write of '*g_char_ptr'.
"""
+import lldb_shared
+
import os, time
import re
-import unittest2
import lldb, lldbutil
from lldbtest import *
@@ -84,10 +85,3 @@ class SetWatchlocationAPITestCase(TestBase):
substrs = [self.violating_func])
# This finishes our test.
-
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
index ebcb6ff12d9..d6a3ca60c87 100644
--- a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
+++ b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
@@ -2,9 +2,10 @@
Use lldb Python SBtarget.WatchAddress() API to create a watchpoint for write of '*g_char_ptr'.
"""
+import lldb_shared
+
import os, time
import re
-import unittest2
import lldb, lldbutil
from lldbtest import *
@@ -124,10 +125,3 @@ class TargetWatchAddressAPITestCase(TestBase):
self.assertFalse(watchpoint)
self.expect(error.GetCString(), exe=False,
substrs = ['watch size of %d is not supported' % 365])
-
-
-if __name__ == '__main__':
- import atexit
- lldb.SBDebugger.Initialize()
- atexit.register(lambda: lldb.SBDebugger.Terminate())
- unittest2.main()
OpenPOWER on IntegriCloud