Follow-on to fix a test from c5011aed9c297d6ddd8ee4f77453b215aa27554a.
authorJim Ingham <jingham@apple.com>
Mon, 18 Oct 2021 23:52:15 +0000 (16:52 -0700)
committerJim Ingham <jingham@apple.com>
Mon, 18 Oct 2021 23:53:32 +0000 (16:53 -0700)
I need to set a fake default platform for the UnitTest test to run on other
systems.

lldb/unittests/Interpreter/TestCommandPaths.cpp

index 2a654d7..13bb4e5 100644 (file)
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
+#include "Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostInfo.h"
@@ -104,6 +105,10 @@ void RunTest(CommandInterpreter &interp, const char *args, bool is_leaf,
 }
 
 TEST_F(VerifyUserMultiwordCmdPathTest, TestErrors) {
+  ArchSpec arch("x86_64-apple-macosx-");
+
+  Platform::SetHostPlatform(PlatformRemoteMacOSX::CreateInstance(true, &arch));
+                            
   DebuggerSP debugger_sp = Debugger::CreateInstance();
   ASSERT_TRUE(debugger_sp);