summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py8
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py9
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py10
3 files changed, 23 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py b/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py
index 465a9352ad5..10cbf9f4867 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py
@@ -13,6 +13,14 @@ class TestWriteMemory(GDBRemoteTestBase):
def setBreakpoint(self, packet):
return "OK"
+ def setUp(self):
+ super(TestWriteMemory, self).setUp()
+ self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+ def tearDown(self):
+ lldb.DBG.SetSelectedPlatform(self._initial_platform)
+ super(TestWriteMemory, self).tearDown()
+
self.server.responder = MyResponder()
target = self.dbg.CreateTargetWithFileAndTargetTriple('', 'x86_64-pc-linux')
process = self.connect(target)
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py
index 1cfdc85c409..e69a4b5e359 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py
@@ -15,7 +15,13 @@ class GCoreTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
mydir = TestBase.compute_mydir(__file__)
- _initial_platform = lldb.DBG.GetSelectedPlatform()
+ def setUp(self):
+ super(GCoreTestCase, self).setUp()
+ self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+ def tearDown(self):
+ lldb.DBG.SetSelectedPlatform(self._initial_platform)
+ super(GCoreTestCase, self).tearDown()
_i386_pid = 5586
_x86_64_pid = 5669
@@ -47,4 +53,3 @@ class GCoreTestCase(TestBase):
self.assertEqual(signal, 19)
self.dbg.DeleteTarget(target)
- lldb.DBG.SetSelectedPlatform(self._initial_platform)
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py
index 4de7a24bb22..b167b3fdf3b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py
@@ -15,7 +15,14 @@ class LinuxCoreThreadsTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
mydir = TestBase.compute_mydir(__file__)
- _initial_platform = lldb.DBG.GetSelectedPlatform()
+
+ def setUp(self):
+ super(LinuxCoreThreadsTestCase, self).setUp()
+ self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+ def tearDown(self):
+ lldb.DBG.SetSelectedPlatform(self._initial_platform)
+ super(LinuxCoreThreadsTestCase, self).tearDown()
_i386_pid = 5193
_x86_64_pid = 5222
@@ -56,4 +63,3 @@ class LinuxCoreThreadsTestCase(TestBase):
self.assertEqual(signal, 0)
self.dbg.DeleteTarget(target)
- lldb.DBG.SetSelectedPlatform(self._initial_platform)
OpenPOWER on IntegriCloud