1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
From: Maximiliano Curia <maxy@gnuservers.com.ar>
Date: Tue, 15 May 2018 15:02:16 +0200
Subject: kdirwatch tests method specific
Skip the tests that won't work for the current backend
---
autotests/kdirwatch_unittest.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/autotests/kdirwatch_unittest.cpp b/autotests/kdirwatch_unittest.cpp
index 7dd8a08..62f666a 100644
--- a/autotests/kdirwatch_unittest.cpp
+++ b/autotests/kdirwatch_unittest.cpp
@@ -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 {
|