Skip all tests using /proc and /sys in LXC containers
These tests fail in S/390 Travis CI build, so just don't run them at all there, as we already did for a couple of tests using /proc that also failed in other LXC-based builds.
This commit is contained in:
@@ -141,6 +141,11 @@ void FileTestCase::TempFile()
|
|||||||
// Check that GetSize() works correctly for special files.
|
// Check that GetSize() works correctly for special files.
|
||||||
TEST_CASE("wxFile::Special", "[file][linux][special-file]")
|
TEST_CASE("wxFile::Special", "[file][linux][special-file]")
|
||||||
{
|
{
|
||||||
|
// LXC containers don't (always) populate /proc and /sys, so skip these
|
||||||
|
// tests there.
|
||||||
|
if ( IsRunningInLXC() )
|
||||||
|
return;
|
||||||
|
|
||||||
// We can't test /proc/kcore here, unlike in the similar
|
// We can't test /proc/kcore here, unlike in the similar
|
||||||
// wxFileName::GetSize() test, as wxFile must be able to open it (at least
|
// wxFileName::GetSize() test, as wxFile must be able to open it (at least
|
||||||
// for reading) and usually we don't have the permissions to do it.
|
// for reading) and usually we don't have the permissions to do it.
|
||||||
@@ -151,9 +156,6 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]")
|
|||||||
|
|
||||||
wxString s;
|
wxString s;
|
||||||
CHECK( fileProc.ReadAll(&s) );
|
CHECK( fileProc.ReadAll(&s) );
|
||||||
|
|
||||||
// /proc files seem to be always empty in LXC containers.
|
|
||||||
if ( !IsRunningInLXC() )
|
|
||||||
CHECK( !s.empty() );
|
CHECK( !s.empty() );
|
||||||
|
|
||||||
// All files in /sys have the size of one kernel page, even if they don't
|
// All files in /sys have the size of one kernel page, even if they don't
|
||||||
|
@@ -341,14 +341,15 @@ void TextFileTestCase::ReadBig()
|
|||||||
// correspond to the real amount of data in them, works.
|
// correspond to the real amount of data in them, works.
|
||||||
TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]")
|
TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]")
|
||||||
{
|
{
|
||||||
|
// LXC containers don't (always) populate /proc and /sys, so skip these
|
||||||
|
// tests there.
|
||||||
|
if ( IsRunningInLXC() )
|
||||||
|
return;
|
||||||
|
|
||||||
SECTION("/proc")
|
SECTION("/proc")
|
||||||
{
|
{
|
||||||
wxTextFile f;
|
wxTextFile f;
|
||||||
CHECK( f.Open("/proc/cpuinfo") );
|
CHECK( f.Open("/proc/cpuinfo") );
|
||||||
|
|
||||||
// /proc files seem to be always empty in LXC containers, so skip this
|
|
||||||
// check there.
|
|
||||||
if ( !IsRunningInLXC() )
|
|
||||||
CHECK( f.GetLineCount() > 1 );
|
CHECK( f.GetLineCount() > 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user