Skip adding a test case for a native backend when QT_NO_INOTIFY is set

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 <pasi.petajajarvi@qt.io>
(cherry picked from commit eabef00425083f19b0da0380378e13780d44a199)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Łukasz Matysiak 2023-11-08 09:30:16 +01:00 committed by Qt Cherry-pick Bot
parent 32212b467c
commit ad387bf591

View File

@ -249,7 +249,9 @@ void tst_QFileSystemWatcher::watchDirectory_data()
QTest::addColumn<QStringList>("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;
}