|
Scott Talbert |
374de8 |
From 14c08046d40203c9d078768e4fe1bf9374865f34 Mon Sep 17 00:00:00 2001
|
|
Scott Talbert |
374de8 |
From: Scott Talbert <swt@techie.net>
|
|
Scott Talbert |
374de8 |
Date: Tue, 7 Apr 2020 01:48:38 +0200
|
|
Scott Talbert |
374de8 |
Subject: [PATCH] Fix tests when run on ppc64le arch
|
|
Scott Talbert |
374de8 |
|
|
Scott Talbert |
374de8 |
---
|
|
Scott Talbert |
374de8 |
tests/file/filetest.cpp | 2 +-
|
|
Scott Talbert |
374de8 |
tests/filename/filenametest.cpp | 2 +-
|
|
Scott Talbert |
374de8 |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
Scott Talbert |
374de8 |
|
|
Scott Talbert |
374de8 |
diff --git a/tests/file/filetest.cpp b/tests/file/filetest.cpp
|
|
Scott Talbert |
374de8 |
index f1876daf94..9692bd3c60 100644
|
|
Scott Talbert |
374de8 |
--- a/tests/file/filetest.cpp
|
|
Scott Talbert |
374de8 |
+++ b/tests/file/filetest.cpp
|
|
Scott Talbert |
374de8 |
@@ -159,7 +159,7 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]")
|
|
Scott Talbert |
374de8 |
// All files in /sys seem to have size of 4KiB currently, even if they
|
|
Scott Talbert |
374de8 |
// don't have that much data in them.
|
|
Scott Talbert |
374de8 |
wxFile fileSys("/sys/power/state");
|
|
Scott Talbert |
374de8 |
- CHECK( fileSys.Length() == 4096 );
|
|
Scott Talbert |
374de8 |
+ CHECK( fileSys.Length() == sysconf(_SC_PAGESIZE) );
|
|
Scott Talbert |
374de8 |
CHECK( fileSys.IsOpened() );
|
|
Scott Talbert |
374de8 |
CHECK( fileSys.ReadAll(&s) );
|
|
Scott Talbert |
374de8 |
CHECK( !s.empty() );
|
|
Scott Talbert |
374de8 |
diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp
|
|
Scott Talbert |
374de8 |
index 240e95205c..2928b8d4cb 100644
|
|
Scott Talbert |
374de8 |
--- a/tests/filename/filenametest.cpp
|
|
Scott Talbert |
374de8 |
+++ b/tests/filename/filenametest.cpp
|
|
Scott Talbert |
374de8 |
@@ -1060,7 +1060,7 @@ TEST_CASE("wxFileName::GetSizeSpecial", "[filename][linux][special-file]")
|
|
Scott Talbert |
374de8 |
//CHECK( size > 0 );
|
|
Scott Talbert |
374de8 |
|
|
Scott Talbert |
374de8 |
// All files in /sys seem to have size of 4KiB currently.
|
|
Scott Talbert |
374de8 |
- CHECK( wxFileName::GetSize("/sys/power/state") == 4096 );
|
|
Scott Talbert |
374de8 |
+ CHECK( wxFileName::GetSize("/sys/power/state") == sysconf(_SC_PAGESIZE) );
|
|
Scott Talbert |
374de8 |
}
|
|
Scott Talbert |
374de8 |
|
|
Scott Talbert |
374de8 |
#endif // __LINUX__
|
|
Scott Talbert |
374de8 |
--
|
|
Scott Talbert |
374de8 |
2.25.1
|
|
Scott Talbert |
374de8 |
|