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>
bb10
Andreas Buhr 2022-02-14 15:00:24 +01:00
parent 8aba951d98
commit e87233fbd8
1 changed files with 8 additions and 1 deletions

View File

@ -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);