You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[lldb][unittests] Add once_flag to initialization of debugger in testing support (#8141)
* [lldb][unittest] Add call_once flag to initialize debugger (llvm#80786)
I tried adding a new unit test to the core test
suite (llvm#79533) but it broke the
test suite on AArch64 Linux due to hitting an assertion for calling
`Debugger::Initialize` more than once. When the unit test suite is
invoked as a standalone binary the test suite state is shared, and
`Debugger::Initialize` gets called in `DiagnosticEventTest.cpp` before
being called in `ProgressReportTest.cpp`.
`DiagnosticEventTest.cpp` uses a call_once flag to initialize the
debugger but it's local to that test. This commit adds a once_flag to
`TestUtilities` so that `Debugger::Initialize` can be called once by the
tests that use it.
(cherry picked from commit 3885483)
* [lldb][unittest] Use shared once_flag in DiagnosticEventTest (llvm#80788)
Incorporates the changes from
llvm#80786 to use a once_flag from
`TestUtilities` instead of a local flag in order to prevent hitting an
assertion that the debugger was initialized again in another test.
(cherry picked from commit 5690027)
0 commit comments