Blackberry: fix tst_QFileInfo::isWritable()
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>
Thu, 13 Sep 2012 14:29:47 +0000 (11:29 -0300)
committerQt by Nokia <qt-info@nokia.com>
Thu, 13 Sep 2012 14:52:51 +0000 (16:52 +0200)
This test checks the access permissions for '/etc/passwd', however the
filesystem on Blackberry is always read-only

Change-Id: I9299531397d4467287541b04184540ad6e2eae72
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp

index 477fd44..df8b1dd 100644 (file)
@@ -1484,7 +1484,10 @@ void tst_QFileInfo::isWritable()
     QVERIFY(fi.exists());
     QVERIFY(!fi.isWritable());
 #endif
-#if defined (Q_OS_UNIX)
+#if defined (Q_OS_BLACKBERRY)
+    // The Blackberry filesystem is read-only
+    QVERIFY(!QFileInfo("/etc/passwd").isWritable());
+#elif defined (Q_OS_UNIX)
     if (::getuid() == 0)
         QVERIFY(QFileInfo("/etc/passwd").isWritable());
     else