Try to show when do X errors happen while running tests
Install an X11 error handler to try to gather more information about the GUI tests failures on buildbot.
This commit is contained in:
parent
f5703673ad
commit
5463402e39
@ -409,6 +409,20 @@ void DeleteTestWindow(wxWindow* win)
|
|||||||
|
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_X11
|
||||||
|
|
||||||
|
#include "X11/Xlib.h"
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
int wxTestX11ErrorHandler(Display*, XErrorEvent*)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "\n*** X11 error while running %s(): ",
|
||||||
|
wxGetCurrentTestName().c_str());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // GDK_WINDOWING_X11
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
void
|
void
|
||||||
wxTestGLogHandler(const gchar* domain,
|
wxTestGLogHandler(const gchar* domain,
|
||||||
@ -472,6 +486,10 @@ bool TestApp::OnInit()
|
|||||||
g_log_set_default_handler(wxTestGLogHandler, NULL);
|
g_log_set_default_handler(wxTestGLogHandler, NULL);
|
||||||
#endif // __WXGTK__
|
#endif // __WXGTK__
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_X11
|
||||||
|
XSetErrorHandler(wxTestX11ErrorHandler);
|
||||||
|
#endif // GDK_WINDOWING_X11
|
||||||
|
|
||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user