diff --git a/tests/test.cpp b/tests/test.cpp index f9afd65ad6..abd3bba7e9 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -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