From ad387bf591d96da5fc9adf50e8856b4326ac6213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Matysiak?= Date: Wed, 8 Nov 2023 09:30:16 +0100 Subject: [PATCH] Skip adding a test case for a native backend when QT_NO_INOTIFY is set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some platforms like VxWorks do not support inotify or any similar solution for file watching. Because of that, the implementation falls back to polling. That means that tests that require a native backend will fail. Fix the problem by skipping adding a test case for a native backend. Task-number: QTBUG-115777 Change-Id: I0d683e6376a0453bd2fd591302c4f3ef7ceea87c Reviewed-by: Pasi Petäjäjärvi (cherry picked from commit eabef00425083f19b0da0380378e13780d44a199) Reviewed-by: Qt Cherry-pick Bot --- .../corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index de10072491a..8b8d5725265 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -249,7 +249,9 @@ void tst_QFileSystemWatcher::watchDirectory_data() QTest::addColumn("testDirNames"); const QStringList testDirNames = {QStringLiteral("testdir"), QStringLiteral("testdir2")}; +#if !defined(QT_NO_INOTIFY) QTest::newRow("native backend") << "native" << testDirNames; +#endif QTest::newRow("poller backend") << "poller" << testDirNames; }