Skip to content
Snippets Groups Projects
Commit 21dd2122 authored by Don Gagne's avatar Don Gagne
Browse files

Turn off Windows Error Reporting for unit tests

This keeps TeamCity from hanging on a dialog box
parent c9274137
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,16 @@ int main(int argc, char *argv[])
_CrtSetReportHook(WindowsCrtReportHook);
#endif
}
#ifdef Q_OS_WIN
if (runUnitTests) {
// Don't pop up Windows Error Reporting dialog when app crashes. This prevents TeamCity from
// hanging.
DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX);
SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX);
}
#endif
#endif // QT_DEBUG
QGCApplication* app = new QGCApplication(argc, argv, runUnitTests);
Q_CHECK_PTR(app);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment