kdirwatch tests method specific
authorMaximiliano Curia <maxy@gnuservers.com.ar>
Tue, 15 May 2018 13:02:16 +0000 (15:02 +0200)
committerMaximiliano Curia <maxy@debian.org>
Thu, 17 Jan 2019 22:26:33 +0000 (22:26 +0000)
Skip the tests that won't work for the current backend

Gbp-Pq: Name kdirwatch-tests-method-specific.patch

autotests/kdirwatch_unittest.cpp

index 7dd8a085b33c12b3b47fdd899e318d5570e3288d..62f666a3a7642cd7fb6fd934e38e68e7e333c8fa 100644 (file)
@@ -836,6 +836,11 @@ void KDirWatch_UnitTest::benchNotifyWatcher()
     KDirWatch watch;
     watch.addDir(dir.path(), KDirWatch::WatchSubDirs | KDirWatch:: WatchFiles);
 
+    auto method = qgetenv("KDIRWATCH_METHOD");
+    if ((method != "INotify") && (method != "QFSWatch")) {
+        QSKIP("Only works with the inotify and qfswatch backends", SkipSingle);
+    }
+
     // now touch all the files repeatedly and wait for the dirty updates to come in
     QSignalSpy spy(&watch, &KDirWatch::dirty);
     QBENCHMARK {