[tracker] functional-tests: Remove unused helper code
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] functional-tests: Remove unused helper code
- Date: Mon, 18 Dec 2017 16:43:28 +0000 (UTC)
commit ebbe0783c78510dea7c6ad3a03df4a9c90518ad1
Author: Sam Thursfield <sam afuera me uk>
Date: Mon Dec 18 16:33:23 2017 +0000
functional-tests: Remove unused helper code
.../common/utils/applicationstest.py | 128 ---------
tests/functional-tests/common/utils/extractor.py | 274 --------------------
tests/functional-tests/common/utils/helpers.py | 38 ---
tests/functional-tests/common/utils/minertest.py | 122 ---------
tests/functional-tests/common/utils/system.py | 61 -----
.../functional-tests/common/utils/writebacktest.py | 132 ----------
6 files changed, 0 insertions(+), 755 deletions(-)
---
diff --git a/tests/functional-tests/common/utils/helpers.py b/tests/functional-tests/common/utils/helpers.py
index 23394f3..d085e26 100644
--- a/tests/functional-tests/common/utils/helpers.py
+++ b/tests/functional-tests/common/utils/helpers.py
@@ -537,41 +537,3 @@ class StoreHelper (Helper):
return False
else:
raise Exception ("Something fishy is going on")
-
-
-class MinerFsHelper (Helper):
-
- PROCESS_NAME = 'tracker-miner-fs'
- PROCESS_PATH = os.path.join (cfg.EXEC_PREFIX, "tracker-miner-fs")
- BUS_NAME = cfg.MINERFS_BUSNAME
-
- FLAGS = ['--initial-sleep=0']
-
- def start (self):
- Helper.start (self)
-
- self.miner_fs = Gio.DBusProxy.new_sync(
- self.bus, Gio.DBusProxyFlags.DO_NOT_AUTO_START, None,
- cfg.MINERFS_BUSNAME, cfg.MINERFS_OBJ_PATH, cfg.MINER_IFACE)
- self.index = Gio.DBusProxy.new_sync(
- self.bus, Gio.DBusProxyFlags.DO_NOT_AUTO_START, None,
- cfg.MINERFS_BUSNAME, cfg.MINERFS_INDEX_OBJ_PATH, cfg.MINER_INDEX_IFACE)
-
- def stop (self):
- Helper.stop (self)
-
- def index_file (self, uri):
- return self.index.IndexFile('(s)', uri)
-
-
-class ExtractorHelper (Helper):
-
- PROCESS_NAME = 'tracker-extract'
- BUS_NAME = cfg.TRACKER_EXTRACT_BUSNAME
-
-
-class WritebackHelper (Helper):
-
- PROCESS_NAME = 'tracker-writeback'
- PROCESS_PATH = os.path.join (cfg.EXEC_PREFIX, 'tracker-writeback')
- BUS_NAME = cfg.WRITEBACK_BUSNAME
diff --git a/tests/functional-tests/common/utils/system.py b/tests/functional-tests/common/utils/system.py
index 177f551..bf8433d 100644
--- a/tests/functional-tests/common/utils/system.py
+++ b/tests/functional-tests/common/utils/system.py
@@ -140,43 +140,6 @@ class TrackerSystemAbstraction (object):
assert self.store
self.store.stop ()
-
- def tracker_miner_fs_testing_start (self, confdir=None):
- """
- Stops any previous instance of the store and miner, calls set_up_environment,
- and starts a new instance of the store and miner-fs
- """
- self.set_up_environment (confdir, None)
-
- # Start also the store. DBus autoactivation ignores the env variables.
- self.store = helpers.StoreHelper ()
- self.store.start ()
-
- self.extractor = helpers.ExtractorHelper ()
- self.extractor.start ()
-
- self.miner_fs = helpers.MinerFsHelper ()
- self.miner_fs.start ()
-
- def tracker_miner_fs_testing_stop (self):
- """
- Stops the extractor, miner-fs and store running
- """
- self.extractor.stop ()
- self.miner_fs.stop ()
- self.store.stop ()
-
- def tracker_writeback_testing_start (self, confdir=None):
- # Start the miner-fs (and store) and then the writeback process
- self.tracker_miner_fs_testing_start (confdir)
- self.writeback = helpers.WritebackHelper ()
- self.writeback.start ()
-
- def tracker_writeback_testing_stop (self):
- # Tracker write must have been started before
- self.writeback.stop ()
- self.tracker_miner_fs_testing_stop ()
-
def tracker_all_testing_start (self, confdir=None):
# This will start all miner-fs, store and writeback
self.tracker_writeback_testing_start (confdir)
@@ -189,27 +152,3 @@ class TrackerSystemAbstraction (object):
if (os.path.exists (directory)):
shutil.rmtree (directory)
os.makedirs (directory)
-
-
-if __name__ == "__main__":
- import gtk, glib, time
-
- def destroy_the_world (a):
- a.tracker_store_testing_stop ()
- print " stopped"
- Gtk.main_quit()
-
- print "-- Starting store --"
- a = TrackerSystemAbstraction ()
- a.tracker_store_testing_start ()
- print " started, waiting 5 sec. to stop it"
- GLib.timeout_add_seconds (5, destroy_the_world, a)
- Gtk.main ()
-
- print "-- Starting miner-fs --"
- b = TrackerMinerFsLifeCycle ()
- b.start ()
- print " started, waiting 3 secs. to stop it"
- time.sleep (3)
- b.stop ()
- print " stopped"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]