Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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.
- Loading branch information