diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-12-18 13:05:57 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-12-22 09:27:31 +0100 |
commit | 616ac8e59c3ac5d743b766859a23f6fc8e6c0a11 (patch) | |
tree | d36768465559a22f1f5ca987d4b97c965842ef42 /tests/auto/corelib/io | |
parent | 5681ae74e35b861b03a51cc5f9dbcbadef45b24c (diff) |
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 <bogdan@kde.org>
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r-- | tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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); |