diff options
author | Jason Molenda <jmolenda@apple.com> | 2019-08-21 00:27:30 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2019-08-21 00:27:30 +0000 |
commit | 1ecc507e2a5f004ef7b0a6d39708bec58f09012e (patch) | |
tree | 416943a546fb1733679795590b4f18789d658986 /lldb/packages/Python/lldbsuite/test/functionalities/postmortem | |
parent | 5b5929501139c7cc7168d55bc8c989183c7d1aed (diff) | |
download | bcm5719-llvm-1ecc507e2a5f004ef7b0a6d39708bec58f09012e.tar.gz bcm5719-llvm-1ecc507e2a5f004ef7b0a6d39708bec58f09012e.zip |
Update a few tests that may change the platform to save & restore
the platform in the setUp/tearDown methods. I want to migrate the
re-instatement of the correct plaform to the setUp base method but
haven't had time to look at that yet, so I want to land this handful
of fixes until I get to it.
Differential revision: https://reviews.llvm.org/D66331
llvm-svn: 369484
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/postmortem')
2 files changed, 15 insertions, 4 deletions
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) |