Author: labath Date: Tue Mar 20 06:46:05 2018 New Revision: 327981 URL: http://llvm.org/viewvc/llvm-project?rev=327981&view=rev Log: [LLDB] Fix TestTargetXMLArch's expected arch
Summary: When running on an architecture other than x86_64, the target.ConnectRemote() part of the test may add platform information to the target triple. It was observed that this happens at Process::CompleteAttach() method, after the platform_sp->IsCompatibleArchitecture() check fails. This method then calls platform_sp->GetPlatformForArchitecture(), that on a Linux machine ends up returning a generic Linux platform, that then ends up getting added to the original target architecture. Reviewers: clayborg, labath, jasonmolenda Reviewed By: labath Subscribers: alexandreyy, lbianc Differential Revision: https://reviews.llvm.org/D44022 Patch by Leandro Lupori <leandro.lup...@gmail.com>. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py?rev=327981&r1=327980&r2=327981&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py Tue Mar 20 06:46:05 2018 @@ -121,4 +121,4 @@ class TestTargetXMLArch(GDBRemoteTestBas if self.TraceOn(): interp.HandleCommand("target list", result) print(result.GetOutput()) - self.assertEqual('x86_64--', target.GetTriple()) + self.assertTrue(target.GetTriple().startswith('x86_64--')) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits