From e87233fbd86d9469d2b63e3b606e01a9d54b25b7 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Mon, 14 Feb 2022 15:00:24 +0100 Subject: [PATCH] Repair tst_qfileinfo on Android Pick-to: 6.2 6.3 Change-Id: I79e0236b90b8a6ca2618d7a9ddac34b26bbd5b5f Reviewed-by: Rami Potinkara Reviewed-by: Assam Boudjelthia --- tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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);