[Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture

Francis Ricci via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 23 09:50:28 PDT 2016

fjricci created this revision.
fjricci added reviewers: clayborg, tfiala, zturner.
fjricci added subscribers: lldb-commits, sas.

When running the test suite in platform mode, this test would
use 'platform select host', which would cause the rest of the suite to stop running
in platform mode.

Instead, use 'platform select' to select the remote platform, if it exists.



Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py
--- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py
+++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py
@@ -39,5 +39,9 @@
             self.runCmd("file {}".format(file_name))
             self.match("image list -t -A", [expected_triple_and_arch_regex])
-        # Revert to the host platform after all of this is done
-        self.runCmd("platform select host")
+        # Revert to the original platform after all of this is done
+        if lldb.remote_platform:
+            self.runCmd('platform select %s' % lldb.remote_platform.GetName())
+        else:
+            self.runCmd("platform select host")

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21648.61689.patch
Type: text/x-patch
Size: 873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160623/a68f2af6/attachment-0001.bin>

More information about the lldb-commits mailing list