Author: labath
Date: Tue Jan  3 07:18:12 2017
New Revision: 290890

URL: http://llvm.org/viewvc/llvm-project?rev=290890&view=rev
Log:
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.

Modified:
    
lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py?rev=290890&r1=290889&r2=290890&view=diff
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/TestLinuxCore.py
 Tue Jan  3 07:18:12 2017
@@ -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):


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to