Disable tests of /proc/cpuinfo in LXC containers
It seems that we can't access /proc files when running inside such containers, so don't try to do it.
This commit is contained in:
@@ -69,6 +69,10 @@ std::string wxTheCurrentTestClass, wxTheCurrentTestMethod;
|
||||
#endif // __WXGTK__
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#ifdef __LINUX__
|
||||
#include "wx/filename.h"
|
||||
#endif
|
||||
|
||||
#include "wx/socket.h"
|
||||
#include "wx/evtloop.h"
|
||||
|
||||
@@ -418,6 +422,17 @@ extern bool IsRunningUnderXVFB()
|
||||
return s_isRunningUnderXVFB == 1;
|
||||
}
|
||||
|
||||
#ifdef __LINUX__
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
#endif // __LINUX__
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
bool EnableUITests()
|
||||
|
Reference in New Issue
Block a user