<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 7, 2015 at 12:24 PM, Pete Cooper <span dir="ltr"><<a href="mailto:peter_cooper@apple.com" target="_blank">peter_cooper@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><br>
> On Apr 7, 2015, at 11:46 AM, Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>> wrote:<br>
><br>
> Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> writes:<br>
>> We already do this in llvm::sys::PrintStackTraceOnErrorSignal. You could<br>
>> setenv("LLVM_DISABLE_CRASH_REPORT", "1") to get this behavior.<br>
>><br>
>> Either way is probably fine.<br>
><br>
> Sure, but it makes sense to do this unconditionally in the unit tests.<br>
> Crash reports for unit tests (especially death tests) are never useful.<br>
</span>How about this as an alternative?  It adds a boolean to force crash reporting to be disabled.<br>
<br>
Note, I do think all the WIN32 stuff in utils/unittest/UnitTestMain/TestMain.cpp should be moved to PrintStackTraceOnErrorSignal or DisableSystemDialogsOnCrash in Signals.inc, but i don’t have a Windows machine to test that change.  If anyone wants to do that in a follow up based on the boolean I’ve added here then that would be great.<br></blockquote><div><br></div><div>I think on Windows we don't actually want the boolean, we always want to suppress blocking modal dialogs, no questions asked. I have a feeling that DisableSystemDialogsOnCrash is a superset of the code in TestMain. I may try deleting the TestMain code and see if things keep functioning.</div></div></div></div>