Skip network tests when running under Travis CI

These tests fail sporadically for some reason outside of our control, just
skip them rather than have frequent false positives.
This commit is contained in:
Vadim Zeitlin
2016-01-26 23:19:51 +01:00
parent 68eae6ba5b
commit bef874a674

View File

@@ -443,6 +443,16 @@ extern void SetProcessEventFunc(ProcessEventFunc func)
extern bool IsNetworkAvailable()
{
// Somehow even though network is available on Travis CI build machines,
// attempts to open remote URIs sporadically fail, so don't run these tests
// under Travis to avoid false positives.
static int s_isTravis = -1;
if ( s_isTravis == -1 )
s_isTravis = wxGetEnv("TRAVIS", NULL);
if ( s_isTravis )
return false;
// NOTE: we could use wxDialUpManager here if it was in wxNet; since it's in
// wxCore we use a simple rough test: