Disable tests requiring a WM under Xvfb
Both iconization and activation of TLWs is dependent on the presence of a WM, but there is no WM running under Xvfb, so skip these tests in this case.
This commit is contained in:
@@ -112,16 +112,25 @@ TEST_CASE_METHOD(PersistenceTests, "wxPersistTLW", "[persist][tlw]")
|
||||
frame->Show();
|
||||
|
||||
#ifdef __WXGTK__
|
||||
wxStopWatch sw;
|
||||
while ( !frame->IsIconized() )
|
||||
// When using Xvfb, the frame will never get iconized, presumably
|
||||
// because there is no WM, so don't even bother waiting or warning.
|
||||
if ( IsRunningUnderXVFB() )
|
||||
{
|
||||
wxYield();
|
||||
if ( sw.Time() > 500 )
|
||||
checkIconized = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxStopWatch sw;
|
||||
while ( !frame->IsIconized() )
|
||||
{
|
||||
// 500ms should be enough for the window to end up iconized.
|
||||
WARN("Frame wasn't iconized as expected");
|
||||
checkIconized = false;
|
||||
break;
|
||||
wxYield();
|
||||
if ( sw.Time() > 500 )
|
||||
{
|
||||
// 500ms should be enough for the window to end up iconized.
|
||||
WARN("Frame wasn't iconized as expected");
|
||||
checkIconized = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // __WXGTK__
|
||||
|
Reference in New Issue
Block a user