summaryrefslogtreecommitdiff
path: root/tests/libtracker-miner/tracker-crawler-test.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2014-03-22 23:09:11 +0100
committerCarlos Garnacho <carlosg@gnome.org>2014-04-27 17:10:59 +0200
commit0ca4895e82c446bd49fc8ae6c72723d764cf8274 (patch)
treec97c85e7cfe945f87143f888b2a12a24aa274b43 /tests/libtracker-miner/tracker-crawler-test.c
parentb40ac392cfb5a13f5a2571903755819d29b114d8 (diff)
downloadtracker-0ca4895e82c446bd49fc8ae6c72723d764cf8274.tar.gz
libtracker-miner: Make crawler take a maximum recursion depth
TrackerCrawler gets now the maximum depth to recurse into as a parameter to tracker_crawler_start(), this can be used to divide crawling into units bigger than individual folders. A value of -1 can be passed to have it recurse with no restrictions as with the previous recurse=TRUE argument.
Diffstat (limited to 'tests/libtracker-miner/tracker-crawler-test.c')
-rw-r--r--tests/libtracker-miner/tracker-crawler-test.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/libtracker-miner/tracker-crawler-test.c b/tests/libtracker-miner/tracker-crawler-test.c
index 69a9630c6..4f44edeeb 100644
--- a/tests/libtracker-miner/tracker-crawler-test.c
+++ b/tests/libtracker-miner/tracker-crawler-test.c
@@ -126,7 +126,7 @@ test_crawler_crawl (void)
file = g_file_new_for_path (TEST_DATA_DIR);
- started = tracker_crawler_start (crawler, file, TRUE);
+ started = tracker_crawler_start (crawler, file, -1);
g_assert_cmpint (started, ==, 1);
@@ -153,7 +153,7 @@ test_crawler_crawl_interrupted (void)
file = g_file_new_for_path (TEST_DATA_DIR);
- started = tracker_crawler_start (crawler, file, TRUE);
+ started = tracker_crawler_start (crawler, file, -1);
g_assert_cmpint (started, ==, 1);
@@ -175,7 +175,7 @@ test_crawler_crawl_nonexisting (void)
crawler = tracker_crawler_new ();
file = g_file_new_for_path (TEST_DATA_DIR "-idontexist");
- started = tracker_crawler_start (crawler, file, TRUE);
+ started = tracker_crawler_start (crawler, file, -1);
g_assert_cmpint (started, ==, 0);
@@ -200,7 +200,7 @@ test_crawler_crawl_recursive (void)
file = g_file_new_for_path (TEST_DATA_DIR);
- tracker_crawler_start (crawler, file, TRUE);
+ tracker_crawler_start (crawler, file, -1);
g_main_loop_run (test.main_loop);
@@ -232,7 +232,7 @@ test_crawler_crawl_non_recursive (void)
file = g_file_new_for_path (TEST_DATA_DIR);
- tracker_crawler_start (crawler, file, FALSE);
+ tracker_crawler_start (crawler, file, 1);
g_main_loop_run (test.main_loop);
@@ -270,7 +270,7 @@ test_crawler_crawl_n_signals (void)
file = g_file_new_for_path (TEST_DATA_DIR);
- tracker_crawler_start (crawler, file, TRUE);
+ tracker_crawler_start (crawler, file, -1);
g_main_loop_run (test.main_loop);
@@ -308,7 +308,7 @@ test_crawler_crawl_n_signals_non_recursive (void)
file = g_file_new_for_path (TEST_DATA_DIR);
- tracker_crawler_start (crawler, file, FALSE);
+ tracker_crawler_start (crawler, file, 1);
g_main_loop_run (test.main_loop);