Switch to manual method of LXC "detection"
Just define wxLXC environment variable for the builds using LXC on Travis.
This commit is contained in:
@@ -9,10 +9,13 @@ matrix:
|
|||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
env: wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1
|
||||||
- os: linux
|
- os: linux
|
||||||
arch: ppc64le
|
arch: ppc64le
|
||||||
|
env: wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1
|
||||||
- os: linux
|
- os: linux
|
||||||
arch: s390x
|
arch: s390x
|
||||||
|
env: wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1
|
||||||
# - dist: precise
|
# - dist: precise
|
||||||
# compiler: gcc
|
# compiler: gcc
|
||||||
# env: wxUSE_XVFB=1
|
# env: wxUSE_XVFB=1
|
||||||
|
@@ -69,10 +69,6 @@ std::string wxTheCurrentTestClass, wxTheCurrentTestMethod;
|
|||||||
#endif // __WXGTK__
|
#endif // __WXGTK__
|
||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
#ifdef __LINUX__
|
|
||||||
#include "wx/filename.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/socket.h"
|
#include "wx/socket.h"
|
||||||
#include "wx/evtloop.h"
|
#include "wx/evtloop.h"
|
||||||
|
|
||||||
@@ -426,9 +422,12 @@ extern bool IsRunningUnderXVFB()
|
|||||||
|
|
||||||
extern bool IsRunningInLXC()
|
extern bool IsRunningInLXC()
|
||||||
{
|
{
|
||||||
// This is simplistic but should work in the normal cases and can always be
|
// We're supposed to be able to detect running in LXC by checking for
|
||||||
// made more precise later if necessary.
|
// /dev/lxd existency, but this doesn't work under Travis for some reason,
|
||||||
return wxFileName::DirExists("/dev/lxd");
|
// 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__
|
#endif // __LINUX__
|
||||||
|
Reference in New Issue
Block a user