summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-01-03 13:18:12 +0000
committerPavel Labath <labath@google.com>2017-01-03 13:18:12 +0000
commit0ecce2300a37d6060209b5cb77b6bb2b936d4cf0 (patch)
treeb76c065fcc43e2531f873e8d9ac408745baeae27 /lldb/packages/Python/lldbsuite/test
parent205d7d3f6878fa05037e1355ff2f552bdbbd9637 (diff)
downloadbcm5719-llvm-0ecce2300a37d6060209b5cb77b6bb2b936d4cf0.tar.gz
bcm5719-llvm-0ecce2300a37d6060209b5cb77b6bb2b936d4cf0.zip
Fix-up TestLinuxCore for r290874
r290874 enabled the s390x test, which caused the rest of the tests to start misbehaving. This is because this test switches the selected platform and the change persists. This fixes it by explicitly resetting the platform in a similar way to the gcore tests do. Potentially we should consider re-setting the platform globally between each test run to better protect tests from each other. llvm-svn: 290890
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
index 19b779ff53f..7a987aeafb5 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
@@ -26,6 +26,14 @@ class LinuxCoreTestCase(TestBase):
_x86_64_regions = 5
_s390x_regions = 2
+ def setUp(self):
+ super(LinuxCoreTestCase, self).setUp()
+ self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+ def tearDown(self):
+ lldb.DBG.SetSelectedPlatform(self._initial_platform)
+ super(LinuxCoreTestCase, self).tearDown()
+
@skipIf(oslist=['windows'])
@skipIf(triple='^mips')
def test_i386(self):
OpenPOWER on IntegriCloud