summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfileinfo
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2012-09-13 15:06:19 -0300
committerQt by Nokia <qt-info@nokia.com>2012-09-14 13:33:45 +0200
commit3414828ccc91da0d94f3b160f29766b9273357ad (patch)
treeb99e99787187b0343c062088520ae81d80275d0f /tests/auto/qfileinfo
parent0f5f7c22677e8681ff2af393d01cadd590fe250f (diff)
Blackberry: fix tst_QFileInfo::isWritable()
This test checks the access permissions for '/etc/passwd', however the filesystem on Blackberry is always read-only. cherry-picked from qt5 4a588c27e8073076cca19a8cc6eed5f1ce1d07e2 Change-Id: I6d14785dd94205761e3a73fc7aa420b805cd13a6 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'tests/auto/qfileinfo')
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index 0c9b86b8ad..0b782eb127 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -1556,7 +1556,10 @@ void tst_QFileInfo::isWritable()
QVERIFY(fi.exists());
QVERIFY(!fi.isWritable());
#endif
-#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN)
+#if defined (Q_OS_BLACKBERRY)
+ // The Blackberry filesystem is read-only
+ QVERIFY(!QFileInfo("/etc/passwd").isWritable());
+#elif defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN)
if (::getuid() == 0)
QVERIFY(QFileInfo("/etc/passwd").isWritable());
else