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
Pick-to: 6.7
Change-Id: I0d683e6376a0453bd2fd591302c4f3ef7ceea87c
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
bb10
Łukasz Matysiak 2023-11-08 09:30:16 +01:00
parent 1f32345a9a
commit eabef00425
1 changed files with 2 additions and 0 deletions

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;
}