From bef874a6745df9a3a7d26e256dd2410e51f8c37e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 26 Jan 2016 23:19:51 +0100 Subject: [PATCH] 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. --- tests/test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test.cpp b/tests/test.cpp index d511f97a81..ca92abb885 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -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: