Blame skip-test-s390x.patch

Scott Talbert b91582
From d48ac8dd31d4091303af4336fcc2f37ecc49bd5c Mon Sep 17 00:00:00 2001
Scott Talbert b91582
From: Scott Talbert <swt@techie.net>
Scott Talbert b91582
Date: Wed, 5 Aug 2020 19:58:42 -0400
Scott Talbert b91582
Subject: [PATCH 1/2] Skip /sys/power tests on s390x architecture
Scott Talbert b91582
Scott Talbert b91582
On certain s390x hosts (e.g., the Fedora builders), /sys/power does not exist.
Scott Talbert b91582
---
Scott Talbert b91582
 tests/file/filetest.cpp         | 2 ++
Scott Talbert b91582
 tests/filename/filenametest.cpp | 2 ++
Scott Talbert b91582
 tests/textfile/textfiletest.cpp | 2 ++
Scott Talbert b91582
 3 files changed, 6 insertions(+)
Scott Talbert b91582
Scott Talbert b91582
diff --git a/tests/file/filetest.cpp b/tests/file/filetest.cpp
Scott Talbert b91582
index 0f31b12db3..83d9893462 100644
Scott Talbert b91582
--- a/tests/file/filetest.cpp
Scott Talbert b91582
+++ b/tests/file/filetest.cpp
Scott Talbert b91582
@@ -163,12 +163,14 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]")
Scott Talbert b91582
     // have that much data in them.
Scott Talbert b91582
     const long pageSize = sysconf(_SC_PAGESIZE);
Scott Talbert b91582
 
Scott Talbert b91582
+#if !defined(__s390x__)
Scott Talbert b91582
     wxFile fileSys("/sys/power/state");
Scott Talbert b91582
     CHECK( fileSys.Length() == pageSize );
Scott Talbert b91582
     CHECK( fileSys.IsOpened() );
Scott Talbert b91582
     CHECK( fileSys.ReadAll(&s) );
Scott Talbert b91582
     CHECK( !s.empty() );
Scott Talbert b91582
     CHECK( s.length() < pageSize );
Scott Talbert b91582
+#endif // !__s390x__
Scott Talbert b91582
 }
Scott Talbert b91582
 
Scott Talbert b91582
 #endif // __LINUX__
Scott Talbert b91582
diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp
Scott Talbert b91582
index 12d2d571d7..37598c08ed 100644
Scott Talbert b91582
--- a/tests/filename/filenametest.cpp
Scott Talbert b91582
+++ b/tests/filename/filenametest.cpp
Scott Talbert b91582
@@ -1062,7 +1062,9 @@ TEST_CASE("wxFileName::GetSizeSpecial", "[filename][linux][special-file]")
Scott Talbert b91582
 
Scott Talbert b91582
     // All files in /sys are one page in size, irrespectively of the size of
Scott Talbert b91582
     // their actual contents.
Scott Talbert b91582
+#if !defined(__s390x__)
Scott Talbert b91582
     CHECK( wxFileName::GetSize("/sys/power/state") == sysconf(_SC_PAGESIZE) );
Scott Talbert b91582
+#endif // !__s390x__
Scott Talbert b91582
 }
Scott Talbert b91582
 
Scott Talbert b91582
 #endif // __LINUX__
Scott Talbert b91582
diff --git a/tests/textfile/textfiletest.cpp b/tests/textfile/textfiletest.cpp
Scott Talbert b91582
index dc7d22423d..ab36047450 100644
Scott Talbert b91582
--- a/tests/textfile/textfiletest.cpp
Scott Talbert b91582
+++ b/tests/textfile/textfiletest.cpp
Scott Talbert b91582
@@ -355,6 +355,7 @@ TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]")
Scott Talbert b91582
             CHECK( f.GetLineCount() > 1 );
Scott Talbert b91582
     }
Scott Talbert b91582
 
Scott Talbert b91582
+#if !defined(__s390x__)
Scott Talbert b91582
     SECTION("/sys")
Scott Talbert b91582
     {
Scott Talbert b91582
         wxTextFile f;
Scott Talbert b91582
@@ -363,6 +364,7 @@ TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]")
Scott Talbert b91582
         INFO( "/sys/power/state contains \"" << f[0] << "\"" );
Scott Talbert b91582
         CHECK( (f[0].find("mem") != wxString::npos || f[0].find("disk") != wxString::npos) );
Scott Talbert b91582
     }
Scott Talbert b91582
+#endif // !__s390x__
Scott Talbert b91582
 }
Scott Talbert b91582
 
Scott Talbert b91582
 #endif // __LINUX__
Scott Talbert b91582
-- 
Scott Talbert b91582
2.26.2
Scott Talbert b91582