From 3b6138b1fb14f120fb3d1f5d2d81049a50a72f79 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 14 Oct 2024 10:46:33 +0200 Subject: [PATCH] tst_qmimedatabase: extend checks of 'ls' binary on more Unix OSes The "ls" binary is part of POSIX/Unix systems, so it makes sense to extend the checks for it to more Unix OSes. Explicitly exclude any Darwin-based OS (macOS & other Apple OSes) following the feedback of David Faure. Change-Id: I14ddfc10582781cde237f4c48d8e70c1a9aa2fd3 Reviewed-by: David Faure --- .../auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp index 5d42e46c323..8beeabcd405 100644 --- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp +++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp @@ -221,7 +221,7 @@ void tst_QMimeDatabase::mimeTypeForName() QCOMPARE(doesNotExist.comment(), QString()); QCOMPARE(doesNotExist.aliases(), QStringList()); -#ifdef Q_OS_LINUX +#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) if (m_hasFreedesktopOrg) { QString exePath = QStandardPaths::findExecutable(QLatin1String("ls")); if (exePath.isEmpty())