[Lldb-commits] [lldb] [lldb/Test] Fix oversight in ProcessEventDataTest::SetUp (NFC) (PR #83895)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 4 11:25:23 PST 2024


https://github.com/medismailben updated https://github.com/llvm/llvm-project/pull/83895

>From 0b71b6aafe6a11875ebdb77ecafd63d1ad4556f4 Mon Sep 17 00:00:00 2001
From: Med Ismail Bennani <ismail at bennani.ma>
Date: Mon, 4 Mar 2024 11:25:07 -0800
Subject: [PATCH] [lldb/Test] Fix oversight in ProcessEventDataTest::SetUp
 (NFC)

This patch addresses an oversight in `ProcessEventDataTest::SetUp`
unittest to ensure the Debugger is initialized properly.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
---
 lldb/unittests/Process/ProcessEventDataTest.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lldb/unittests/Process/ProcessEventDataTest.cpp b/lldb/unittests/Process/ProcessEventDataTest.cpp
index dd159496cd881d..e793c6eae20a29 100644
--- a/lldb/unittests/Process/ProcessEventDataTest.cpp
+++ b/lldb/unittests/Process/ProcessEventDataTest.cpp
@@ -8,6 +8,7 @@
 
 #include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
 #include "Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h"
+#include "TestingSupport/TestUtilities.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostInfo.h"
@@ -29,6 +30,8 @@ class ProcessEventDataTest : public ::testing::Test {
     FileSystem::Initialize();
     HostInfo::Initialize();
     PlatformMacOSX::Initialize();
+    std::call_once(TestUtilities::g_debugger_initialize_flag,
+                   []() { Debugger::Initialize(nullptr); });
   }
   void TearDown() override {
     PlatformMacOSX::Terminate();



More information about the lldb-commits mailing list