From 9aae8fc81f2ee46ea82e0fcff1e1d421b1509de0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 15 Jul 2021 19:55:01 +0200 Subject: [PATCH] Remove checks for LXC containers used under Travis CI only As we don't use Travis CI any longer, we don't need these checks neither. --- tests/file/filetest.cpp | 5 ----- tests/filename/filenametest.cpp | 3 --- tests/test.cpp | 14 -------------- tests/testprec.h | 4 ---- tests/textfile/textfiletest.cpp | 5 ----- 5 files changed, 31 deletions(-) diff --git a/tests/file/filetest.cpp b/tests/file/filetest.cpp index 0c38fe69ef..8902eb4d66 100644 --- a/tests/file/filetest.cpp +++ b/tests/file/filetest.cpp @@ -141,11 +141,6 @@ void FileTestCase::TempFile() // Check that GetSize() works correctly for special files. 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 // 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. diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp index e8e4fe1145..f14e58474f 100644 --- a/tests/filename/filenametest.cpp +++ b/tests/filename/filenametest.cpp @@ -949,9 +949,6 @@ TEST_CASE("wxFileName::Shortcuts", "[filename]") // Check that GetSize() works correctly for special files. TEST_CASE("wxFileName::GetSizeSpecial", "[filename][linux][special-file]") { - if ( IsRunningInLXC() ) - return; - wxULongLong size = wxFileName::GetSize("/proc/kcore"); INFO( "size of /proc/kcore=" << size ); CHECK( size > 0 ); diff --git a/tests/test.cpp b/tests/test.cpp index cef50eaf67..d5699cffef 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -424,20 +424,6 @@ extern bool IsRunningUnderXVFB() return s_isRunningUnderXVFB == 1; } -#ifdef __LINUX__ - -extern bool IsRunningInLXC() -{ - // 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__ - #if wxUSE_GUI bool EnableUITests() diff --git a/tests/testprec.h b/tests/testprec.h index 4467b7ee36..d3340eff03 100644 --- a/tests/testprec.h +++ b/tests/testprec.h @@ -147,10 +147,6 @@ extern bool IsAutomaticTest(); extern bool IsRunningUnderXVFB(); -#ifdef __LINUX__ -extern bool IsRunningInLXC(); -#endif // __LINUX__ - // Helper class setting the locale to the given one for its lifetime. class LocaleSetter { diff --git a/tests/textfile/textfiletest.cpp b/tests/textfile/textfiletest.cpp index 4dfd597c18..f744ffc327 100644 --- a/tests/textfile/textfiletest.cpp +++ b/tests/textfile/textfiletest.cpp @@ -341,11 +341,6 @@ void TextFileTestCase::ReadBig() // correspond to the real amount of data in them, works. 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") { wxTextFile f;