[tracker/sam/functional-test-fixes: 1/12] functional-tests: Writeback faff
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/functional-test-fixes: 1/12] functional-tests: Writeback faff
- Date: Sun, 7 Dec 2014 20:54:25 +0000 (UTC)
commit c3101adecab8b453047cb88fd8159300c38917e7
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Jul 20 00:34:00 2014 +0100
functional-tests: Writeback faff
Writeback tests still fail; mtime related?
tests/functional-tests/common/utils/helpers.py | 26 ++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/tests/functional-tests/common/utils/helpers.py b/tests/functional-tests/common/utils/helpers.py
index 494deba..e4711be 100644
--- a/tests/functional-tests/common/utils/helpers.py
+++ b/tests/functional-tests/common/utils/helpers.py
@@ -590,6 +590,32 @@ class MinerFsHelper (Helper):
def stop (self):
Helper.stop (self)
+ def ignore (self, filelist):
+ self.miner_fs.IgnoreNextUpdate (filelist)
+
+ def wait_for_idle (self, timeout=REASONABLE_TIMEOUT):
+ """
+ Block until the miner has finished crawling and its status becomes "Idle"
+ """
+ status = self.miner_fs.GetStatus()
+ log ('Current miner FS status: %s' % status)
+
+ if status == 'Idle':
+ return
+
+ self.status_match = self.bus.add_signal_receiver (self._minerfs_status_cb,
+ signal_name="Progress",
+ path=cfg.MINERFS_OBJ_PATH,
+ dbus_interface=cfg.MINER_IFACE)
+ self.timeout_id = GLib.timeout_add_seconds (REASONABLE_TIMEOUT, self._timeout_on_idle_cb)
+
+ self.loop.run ()
+
+ if self.timeout_id is not None:
+ GLib.source_remove (self.timeout_id)
+ self.bus._clean_up_signal_match (self.status_match)
+
+>>>>>>> 450c41d... functional-tests: Writeback faff
class ExtractorHelper (Helper):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]