Skip to content
Snippets Groups Projects
Commit ccd74dec authored by Xavier Claessens's avatar Xavier Claessens Committed by Sjoerd Simons
Browse files

tracker: add more debug messages

Reviewers: smcv, pwith

Differential Revision: https://phabricator.apertis.org/D480
parent 02150ccf
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ class TrackerTest(unittest.TestCase):
pass
def tracker_config_tests(self):
print("TrackerTest: config tests")
settings = Gio.Settings.new("org.freedesktop.Tracker.Miner.Files")
self.assertEqual(settings.get_boolean('index-removable-devices'), True)
self.assertEqual(settings.get_int('removable-days-threshold'), 60)
......@@ -44,14 +45,18 @@ class TrackerTest(unittest.TestCase):
# self.assertEqual(settings.get_boolean('enable-writeback'), False)
def tracker_journal_tests(self):
print("TrackerTest: journal tests")
path = ('%s/.local/share/tracker/data/tracker-store.journal' %
self.homedir)
self.assertFalse(os.path.isfile(path))
def tracker_initial_tests(self):
print("TrackerTest: initial tests")
self.indexer.assert_all_indexed(self.homedir)
def tracker_update_tests(self):
print("TrackerTest: update tests")
# Create a new file and assert it gets indexed
filename = self.homedir + '/Documents/something.txt'
with open(filename, 'w') as f:
......@@ -81,6 +86,7 @@ class TrackerTest(unittest.TestCase):
self.assertTrue(os.path.isfile(path))
def thumbnail_tests(self):
print("TrackerTest: thumbnail tests")
self.assert_has_thumbnail('Documents/lorem_presentation.odp')
self.assert_has_thumbnail('Documents/lorem_spreadsheet.ods')
self.assert_has_thumbnail('Documents/more_lorem_ipsum.odt')
......@@ -136,6 +142,7 @@ class TrackerTest(unittest.TestCase):
self.loop.quit()
def tracker_grilo_tests(self):
print("TrackerTest: grilo tests")
registry = Grl.Registry.get_default()
registry.load_plugin_by_id('grl-tracker')
registry.connect('source-added', self.grl_source_added_cb)
......
......@@ -38,6 +38,7 @@ class TrackerIndexer():
Copy media resources from apertis-tests to @dst with per media type
subdirectory corresponding to the default subdirectories in $HOME.
"""
print("TrackerIndexer: copying medias to " + dst)
self.copytree(MEDIADIR + '/audio', dst + '/Music')
self.copytree(MEDIADIR + '/documents', dst + '/Documents')
self.copytree(MEDIADIR + '/images', dst + '/Pictures')
......@@ -88,6 +89,7 @@ class TrackerIndexer():
self.loop.quit()
def start(self):
print("TrackerIndexer: start")
self.manager = TrackerControl.MinerManager.new_full(True)
self.conn = Tracker.SparqlConnection.get(None)
self.statuses = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment