[libcxx-commits] [PATCH] D155554: [libcxx] [test] Fix running tests with Clang-cl in Debug mode

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 20 05:12:39 PDT 2023


mstorsjo added inline comments.


================
Comment at: libcxx/test/support/set_windows_crt_report_mode.h:29-31
   _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
   _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
   _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
----------------
andrewng wrote:
> mstorsjo wrote:
> > andrewng wrote:
> > > Does this work for you? I had to change this in my patch otherwise the pop-up for which version of Visual Studio to use would come up and stall testing, IIRC. Perhaps this depends on some specific Windows environment/configuration?
> > Yeah, it does seem to work for me as is. If it needs to be changed, we can do that in a separate change (ideally by figuring out why/when it’s needed), but this patch is enough for me (and the CI environment) for running the tests in debug mode.
> > 
> > I also tested specifically tests with failing asserts, and they get printed on the console as expected, without any blocking dialog.
> According to the docs for `_CrtSetReportMode`, `_CRTDBG_MODE_DEBUG` means "Writes the message to the debugger's output window.". I'm guessing that what happens in this mode might depend on debugger settings. The code in my patch explicitly set `_CrtSetReportMode` to output to `STDERR`.
I see, thanks. I can split out that bit and submit as a separate patch with that description then.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155554/new/

https://reviews.llvm.org/D155554



More information about the libcxx-commits mailing list