summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
diff options
context:
space:
mode:
authorAndreas Buhr <andreas.buhr@qt.io>2022-02-14 15:00:24 +0100
committerAndreas Buhr <andreas.buhr@qt.io>2022-02-16 21:09:59 +0100
commite87233fbd86d9469d2b63e3b606e01a9d54b25b7 (patch)
treea02b586148c473cd1f1fda228783bb5188d6a8bb /tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
parent8aba951d98484992d68266d5820f82941d4e6d10 (diff)
Repair tst_qfileinfo on Android
Pick-to: 6.2 6.3 Change-Id: I79e0236b90b8a6ca2618d7a9ddac34b26bbd5b5f Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp')
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 395db040b0..45645e2ac6 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -1878,7 +1878,13 @@ void tst_QFileInfo::isExecutable()
{
QString appPath = QCoreApplication::applicationDirPath();
#ifdef Q_OS_ANDROID
- appPath += "/libtst_qfileinfo.so";
+ QDir dir(appPath);
+ QVERIFY(dir.exists());
+ dir.setNameFilters({ "libtst_qfileinfo*.so" });
+ QStringList entries = dir.entryList();
+ QCOMPARE(entries.size(), 1);
+
+ appPath += "/" + entries[0];
#else
appPath += "/tst_qfileinfo";
# if defined(Q_OS_WIN)
@@ -1886,6 +1892,7 @@ void tst_QFileInfo::isExecutable()
# endif
#endif
QFileInfo fi(appPath);
+ QVERIFY(fi.exists());
QCOMPARE(fi.isExecutable(), true);
QCOMPARE(QFileInfo(m_proFile).isExecutable(), false);