diff --git a/.travis.yml b/.travis.yml index 8cd82972f2..67c5f41e6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,13 @@ matrix: include: - os: linux arch: arm64 + env: wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1 - os: linux arch: ppc64le + env: wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1 - os: linux arch: s390x + env: wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1 # - dist: precise # compiler: gcc # env: wxUSE_XVFB=1 diff --git a/tests/test.cpp b/tests/test.cpp index 6dce6f2249..22350ff04f 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -69,10 +69,6 @@ std::string wxTheCurrentTestClass, wxTheCurrentTestMethod; #endif // __WXGTK__ #endif // wxUSE_GUI -#ifdef __LINUX__ - #include "wx/filename.h" -#endif - #include "wx/socket.h" #include "wx/evtloop.h" @@ -426,9 +422,12 @@ extern bool IsRunningUnderXVFB() extern bool IsRunningInLXC() { - // This is simplistic but should work in the normal cases and can always be - // made more precise later if necessary. - return wxFileName::DirExists("/dev/lxd"); + // We're supposed to be able to detect running in LXC by checking for + // /dev/lxd existency, but this doesn't work under Travis for some reason, + // so just rely on having the environment variable defined for the + // corresponding builds in our .travis.yml. + wxString value; + return wxGetEnv("wxLXC", &value) && value == "1"; } #endif // __LINUX__