Fix the unit test suite exit code in case of failure.
Return the program exit code from the (overridden) OnRun(), not OnExit(), doing it from the latter didn't work since many years. The failures in the GUI tests will be detected by buildbot now.
This commit is contained in:
parent
e8d969244e
commit
3e67b1ef68
@ -336,13 +336,15 @@ public:
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
#else // !wxUSE_GUI
|
||||
|
||||
virtual int OnRun()
|
||||
{
|
||||
m_exitcode = RunTests();
|
||||
if ( TestAppBase::OnRun() != 0 )
|
||||
m_exitcode = EXIT_FAILURE;
|
||||
|
||||
return m_exitcode;
|
||||
}
|
||||
#endif // wxUSE_GUI/!wxUSE_GUI
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
private:
|
||||
void List(Test *test, const string& parent = "") const;
|
||||
@ -715,7 +717,7 @@ int TestApp::OnExit()
|
||||
delete GetTopWindow();
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
return m_exitcode;
|
||||
return TestAppBase::OnExit();
|
||||
}
|
||||
|
||||
// List the tests
|
||||
|
Loading…
Reference in New Issue
Block a user