[Lldb-commits] [PATCH] D29215: [LLDB][MIPS] Fix TestMiniDumpNew

Nitesh Jain via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 30 04:34:34 PST 2017


nitesh.jain updated this revision to Diff 86268.
nitesh.jain added a comment.

Added setUp/tearDown code, which saves and restores the original platform after each run. Thanks


https://reviews.llvm.org/D29215

Files:
  packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py


Index: packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
+++ packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
@@ -23,6 +23,14 @@
     _linux_x86_64_not_crashed_pid = 29939
     _linux_x86_64_not_crashed_pid_offset = 0xD967
 
+    def setUp(self):
+        super(MiniDumpNewTestCase, self).setUp()
+        self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+    def tearDown(self):
+        lldb.DBG.SetSelectedPlatform(self._initial_platform)
+        super(MiniDumpNewTestCase, self).tearDown()
+
     def test_process_info_in_minidump(self):
         """Test that lldb can read the process information from the Minidump."""
         # target create -c linux-x86_64.dmp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29215.86268.patch
Type: text/x-patch
Size: 922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170130/77b47353/attachment.bin>


More information about the lldb-commits mailing list