Use /proc/cpuinfo instead of /proc/diskstats in Linux file tests

The file /proc/diskstats doesn't seem to contain anything on some Travis
builds, so try using /proc/cpuinfo instead.
This commit is contained in:
Vadim Zeitlin
2020-04-07 13:41:21 +02:00
parent 2005e50b27
commit a776a9112e
2 changed files with 2 additions and 2 deletions

View File

@@ -149,7 +149,7 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]")
// 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.
// This file is not seekable and has 0 size, but can still be read. // This file is not seekable and has 0 size, but can still be read.
wxFile fileProc("/proc/diskstats"); wxFile fileProc("/proc/cpuinfo");
CHECK( fileProc.IsOpened() ); CHECK( fileProc.IsOpened() );
wxString s; wxString s;

View File

@@ -347,7 +347,7 @@ TEST_CASE("wxTextFile::Special", "[textfile][linux][special-file]")
SECTION("/proc") SECTION("/proc")
{ {
wxTextFile f; wxTextFile f;
CHECK( f.Open("/proc/diskstats") ); CHECK( f.Open("/proc/cpuinfo") );
CHECK( f.GetLineCount() > 1 ); CHECK( f.GetLineCount() > 1 );
} }