From 616ac8e59c3ac5d743b766859a23f6fc8e6c0a11 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 18 Dec 2014 13:05:57 +0100 Subject: Android: Fix test failure for test QFileInfo::lastRead() This test may not be possible on Android, since the file system can be mounted with noatime or relatime which means read access will not be registered. Change-Id: I40f587e1a1f131ee06f0e3700e908ccaa19c83ce Reviewed-by: BogDan Vatra --- tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp') diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index d187133674..5b67fd2af5 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -1160,7 +1160,11 @@ void tst_QFileInfo::fileTimes() QEXPECT_FAIL("simple", "WinCE only stores date of access data, not the time", Continue); #elif defined(Q_OS_QNX) QEXPECT_FAIL("", "QNX uses the noatime filesystem option", Continue); +#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK) + if (fileInfo.lastRead() <= beforeRead) + QEXPECT_FAIL("", "Android may use relatime or noatime on mounts", Continue); #endif + QVERIFY(fileInfo.lastRead() > beforeRead); QVERIFY(fileInfo.lastModified() > beforeWrite); QVERIFY(fileInfo.lastModified() < beforeRead); -- cgit v1.2.3