summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartyn Russell <martyn@imendio.com>2009-07-29 15:05:08 +0100
committerMartyn Russell <martyn@imendio.com>2009-07-29 15:47:36 +0100
commitc71f36ade84c9317c4093f9c382378b41b202343 (patch)
tree51a4c8dcf6833c7ec613fc9c92706ddae2255523
parent8b607d8073672191c5526411604ede1157f21d76 (diff)
downloadtracker-c71f36ade84c9317c4093f9c382378b41b202343.tar.gz
Moved thumbnailer.[ch] and volume-cleanup.[ch] to tracker-miner-fs
Also while doing this, some make distcheck issues were fixed. We no longer require tracker-marshal-main.c to include tracker-marshal.[ch], this is done automatically now. tests/tracker-store/ was created and the tracker-events-test.c was moved here from tests/tracker-miner-fs. This is still broken for some reason so disabled for now.
-rw-r--r--configure.ac1
-rw-r--r--src/libtracker-common/Makefile.am18
-rw-r--r--src/libtracker-common/tracker-marshal-main.c2
-rw-r--r--src/tracker-extract/Makefile.am24
-rw-r--r--src/tracker-extract/tracker-albumart.c1
-rw-r--r--src/tracker-extract/tracker-main.c1
-rw-r--r--src/tracker-extract/tracker-marshal-main.c2
-rw-r--r--src/tracker-miner-fs/Makefile.am38
-rw-r--r--src/tracker-miner-fs/tracker-indexer.c4
-rw-r--r--src/tracker-miner-fs/tracker-main.c5
-rw-r--r--src/tracker-miner-fs/tracker-marshal-main.c2
-rw-r--r--src/tracker-miner-fs/tracker-module-metadata-utils.c2
-rw-r--r--src/tracker-miner-fs/tracker-thumbnailer.c (renamed from src/libtracker-common/tracker-thumbnailer.c)0
-rw-r--r--src/tracker-miner-fs/tracker-thumbnailer.h (renamed from src/libtracker-common/tracker-thumbnailer.h)0
-rw-r--r--src/tracker-miner-fs/tracker-volume-cleanup.c (renamed from src/tracker-store/tracker-volume-cleanup.c)2
-rw-r--r--src/tracker-miner-fs/tracker-volume-cleanup.h (renamed from src/tracker-store/tracker-volume-cleanup.h)0
-rw-r--r--src/tracker-store/Makefile.am26
-rw-r--r--src/tracker-store/tracker-main.c7
-rw-r--r--src/tracker-store/tracker-marshal-main.c2
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/libtracker-common/Makefile.am16
-rw-r--r--tests/libtracker-common/tracker-thumbnailer-test.c183
-rw-r--r--tests/tracker-miner-fs/Makefile.am20
-rw-r--r--tests/tracker-store/Makefile.am36
-rw-r--r--tests/tracker-store/tracker-events-test.c (renamed from tests/tracker-miner-fs/tracker-events-test.c)0
25 files changed, 103 insertions, 292 deletions
diff --git a/configure.ac b/configure.ac
index 83d5d43f7..a8551cf23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1456,6 +1456,7 @@ AC_CONFIG_FILES([
tests/Makefile
tests/tracker-miner-fs/Makefile
tests/tracker-extract/Makefile
+ tests/tracker-store/Makefile
utils/Makefile
utils/tracker-fts/Makefile
utils/services/Makefile
diff --git a/src/libtracker-common/Makefile.am b/src/libtracker-common/Makefile.am
index 1c25ffc8c..448628c36 100644
--- a/src/libtracker-common/Makefile.am
+++ b/src/libtracker-common/Makefile.am
@@ -54,6 +54,7 @@ libtracker_common_la_VALASOURCES = \
tracker-sparql-builder.vala
libtracker_common_la_SOURCES = \
+ $(marshal_sources) \
$(os_sources) \
$(power_sources) \
$(storage_sources) \
@@ -65,7 +66,6 @@ libtracker_common_la_SOURCES = \
tracker-keyfile-object.c \
tracker-language.c \
tracker-log.c \
- tracker-marshal-main.c \
tracker-module-config.c \
tracker-namespace.c \
tracker-ontology.c \
@@ -74,7 +74,6 @@ libtracker_common_la_SOURCES = \
tracker-statement-list.c \
tracker-type-utils.c \
tracker-utils.c \
- tracker-thumbnailer.c \
libtracker-common.vala.stamp \
$(libtracker_common_la_VALASOURCES:.vala=.c)
@@ -84,8 +83,7 @@ noinst_HEADERS = \
tracker-dbus.h \
tracker-ioprio.h \
tracker-log.h \
- tracker-os-dependant.h \
- tracker-thumbnailer.h
+ tracker-os-dependant.h
libtracker_commoninclude_HEADERS = \
tracker-config-file.h \
@@ -123,18 +121,16 @@ libtracker_common_la_LIBADD = \
$(GLIB2_LIBS) \
$(GDKPIXBUF_LIBS)
+marshal_sources = \
+ tracker-marshal.h \
+ tracker-marshal.c
tracker-marshal.h: tracker-marshal.list
$(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --header > $@
tracker-marshal.c: tracker-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --body > $@
-
-tracker-marshal-main.c: tracker-marshal.c tracker-marshal.h
-
-marshal_sources = \
- tracker-marshal.h \
- tracker-marshal.c
+ echo "#include \"tracker-marshal.h\"" > $@ && \
+ $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --body >> $@
BUILT_SOURCES = \
$(marshal_sources) \
diff --git a/src/libtracker-common/tracker-marshal-main.c b/src/libtracker-common/tracker-marshal-main.c
deleted file mode 100644
index 3ff573db1..000000000
--- a/src/libtracker-common/tracker-marshal-main.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "tracker-marshal.h"
-#include "tracker-marshal.c"
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index 7a92519cb..8c68c3c2e 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -232,6 +232,8 @@ libextract_playlist_la_LIBADD = $(GLIB2_LIBS) $(TOTEM_PL_PARSER_LIBS) $(GCOV_LIB
libexec_PROGRAMS = tracker-extract
tracker_extract_SOURCES = \
+ $(marshal_sources) \
+ $(dbus_sources) \
tracker-albumart.c \
tracker-albumart.h \
tracker-config.c \
@@ -241,8 +243,7 @@ tracker_extract_SOURCES = \
tracker-extract.c \
tracker-extract.h \
tracker-main.c \
- tracker-main.h \
- tracker-marshal-main.c
+ tracker-main.h
tracker_extract_LDADD = \
$(top_builddir)/src/libtracker-common/libtracker-common.la \
@@ -262,14 +263,6 @@ if HAVE_GDKPIXBUF
tracker_extract_LDADD += $(GDKPIXBUF_LIBS)
endif
-tracker-marshal.h: tracker-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --header > $@
-
-tracker-marshal.c: tracker-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --body > $@
-
-tracker-marshal-main.c: tracker-marshal.c tracker-marshal.h
-
marshal_sources = \
tracker-marshal.h \
tracker-marshal.c
@@ -277,12 +270,19 @@ marshal_sources = \
dbus_sources = \
tracker-extract-glue.h
+tracker-marshal.h: tracker-marshal.list
+ $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --header > $@
+
+tracker-marshal.c: tracker-marshal.list
+ echo "#include \"tracker-marshal.h\"" > $@ && \
+ $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --body >> $@
+
%-glue.h: $(top_srcdir)/data/dbus/%.xml
$(DBUSBINDINGTOOL) --mode=glib-server --output=$@ --prefix=$(subst -,_,$*) $^
BUILT_SOURCES = \
- $(dbus_sources) \
- $(marshal_sources)
+ $(marshal_sources) \
+ $(dbus_sources)
CLEANFILES = $(BUILT_SOURCES)
diff --git a/src/tracker-extract/tracker-albumart.c b/src/tracker-extract/tracker-albumart.c
index db6cc9a90..698178c62 100644
--- a/src/tracker-extract/tracker-albumart.c
+++ b/src/tracker-extract/tracker-albumart.c
@@ -39,7 +39,6 @@
#include <dbus/dbus-glib-bindings.h>
#include <libtracker-common/tracker-storage.h>
-#include <libtracker-common/tracker-thumbnailer.h>
#include "tracker-albumart.h"
#include "tracker-dbus.h"
diff --git a/src/tracker-extract/tracker-main.c b/src/tracker-extract/tracker-main.c
index b09784ca8..591b5b35d 100644
--- a/src/tracker-extract/tracker-main.c
+++ b/src/tracker-extract/tracker-main.c
@@ -46,7 +46,6 @@
#include <libtracker-common/tracker-log.h>
#include <libtracker-common/tracker-dbus.h>
#include <libtracker-common/tracker-os-dependant.h>
-#include <libtracker-common/tracker-thumbnailer.h>
#include <libtracker-common/tracker-ioprio.h>
#include "tracker-albumart.h"
diff --git a/src/tracker-extract/tracker-marshal-main.c b/src/tracker-extract/tracker-marshal-main.c
deleted file mode 100644
index 3ff573db1..000000000
--- a/src/tracker-extract/tracker-marshal-main.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "tracker-marshal.h"
-#include "tracker-marshal.c"
diff --git a/src/tracker-miner-fs/Makefile.am b/src/tracker-miner-fs/Makefile.am
index 92a13ce94..0183b63fe 100644
--- a/src/tracker-miner-fs/Makefile.am
+++ b/src/tracker-miner-fs/Makefile.am
@@ -40,6 +40,8 @@ libtracker_module_la_LIBADD = $(GCOV_LIBS)
libexec_PROGRAMS = tracker-miner-fs
tracker_miner_fs_SOURCES = \
+ $(marshal_sources) \
+ $(dbus_sources) \
tracker-config.c \
tracker-config.h \
tracker-crawler.c \
@@ -50,19 +52,22 @@ tracker_miner_fs_SOURCES = \
tracker-indexer-module.c \
tracker-indexer-module.h \
tracker-main.c \
- tracker-marshal-main.c \
tracker-miner.c \
tracker-miner.h \
tracker-monitor.c \
tracker-monitor.h \
tracker-processor.c \
tracker-processor.h \
- tracker-status.c \
- tracker-status.h \
tracker-removable-device.c \
tracker-removable-device.h \
+ tracker-status.c \
+ tracker-status.h \
+ tracker-thumbnailer.c \
+ tracker-thumbnailer.h \
tracker-utils.c \
- tracker-utils.h
+ tracker-utils.h \
+ tracker-volume-cleanup.c \
+ tracker-volume-cleanup.h
tracker_miner_fs_LDADD = \
$(plugin_libs) \
@@ -85,22 +90,21 @@ tracker_miner_fs_LDADD = \
-lz \
-lm
-tracker-marshal.h: tracker-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --header > $@
-
-tracker-marshal.c: tracker-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --body > $@
-
-tracker-marshal-main.c: tracker-marshal.c tracker-marshal.h
-
-marshal_sources = \
- tracker-marshal.h \
- tracker-marshal.c
+marshal_sources = \
+ tracker-marshal.h \
+ tracker-marshal.c
dbus_sources = \
tracker-miner-glue.h \
tracker-extract-client.h
+tracker-marshal.h: tracker-marshal.list
+ $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --header > $@
+
+tracker-marshal.c: tracker-marshal.list
+ echo "#include \"tracker-marshal.h\"" > $@ && \
+ $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --body >> $@
+
%-glue.h: $(top_srcdir)/data/dbus/%.xml
$(DBUSBINDINGTOOL) --mode=glib-server --output=$@ --prefix=$(subst -,_,$*) $^
@@ -108,8 +112,8 @@ dbus_sources = \
$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=$(subst -,_,$*) $^
BUILT_SOURCES = \
- $(dbus_sources) \
- $(marshal_sources)
+ $(marshal_sources) \
+ $(dbus_sources)
CLEANFILES = $(BUILT_SOURCES)
diff --git a/src/tracker-miner-fs/tracker-indexer.c b/src/tracker-miner-fs/tracker-indexer.c
index 4a8d23c74..6c5863643 100644
--- a/src/tracker-miner-fs/tracker-indexer.c
+++ b/src/tracker-miner-fs/tracker-indexer.c
@@ -61,7 +61,6 @@
#include <libtracker-common/tracker-ontology.h>
#include <libtracker-common/tracker-module-config.h>
#include <libtracker-common/tracker-utils.h>
-#include <libtracker-common/tracker-thumbnailer.h>
#include <libtracker-db/tracker-db-dbus.h>
@@ -76,9 +75,10 @@
#include "tracker-indexer-module.h"
#include "tracker-marshal.h"
#include "tracker-processor.h"
-#include "tracker-removable-device.h"
#include "tracker-status.h"
+#include "tracker-thumbnailer.h"
#include "tracker-utils.h"
+#include "tracker-removable-device.h"
#define TRACKER_INDEXER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_INDEXER, TrackerIndexerPrivate))
diff --git a/src/tracker-miner-fs/tracker-main.c b/src/tracker-miner-fs/tracker-main.c
index 811b438f3..cb99f055c 100644
--- a/src/tracker-miner-fs/tracker-main.c
+++ b/src/tracker-miner-fs/tracker-main.c
@@ -40,7 +40,6 @@
#include <libtracker-common/tracker-ontology.h>
#include <libtracker-common/tracker-module-config.h>
#include <libtracker-common/tracker-file-utils.h>
-#include <libtracker-common/tracker-thumbnailer.h>
#include <libtracker-common/tracker-storage.h>
#include <libtracker-db/tracker-db-manager.h>
@@ -54,6 +53,8 @@
#include "tracker-miner.h"
#include "tracker-miner-glue.h"
#include "tracker-marshal.h"
+#include "tracker-thumbnailer.h"
+#include "tracker-volume-cleanup.h"
#define ABOUT \
"Tracker " PACKAGE_VERSION "\n"
@@ -438,6 +439,7 @@ main (gint argc, gchar *argv[])
}
tracker_turtle_init ();
+ tracker_volume_cleanup_init ();
g_message ("Starting...");
@@ -446,6 +448,7 @@ main (gint argc, gchar *argv[])
g_message ("Shutdown started");
+ tracker_volume_cleanup_shutdown ();
tracker_turtle_shutdown ();
albumart_shutdown (config);
diff --git a/src/tracker-miner-fs/tracker-marshal-main.c b/src/tracker-miner-fs/tracker-marshal-main.c
deleted file mode 100644
index 3ff573db1..000000000
--- a/src/tracker-miner-fs/tracker-marshal-main.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "tracker-marshal.h"
-#include "tracker-marshal.c"
diff --git a/src/tracker-miner-fs/tracker-module-metadata-utils.c b/src/tracker-miner-fs/tracker-module-metadata-utils.c
index ad81c5520..34e1960a8 100644
--- a/src/tracker-miner-fs/tracker-module-metadata-utils.c
+++ b/src/tracker-miner-fs/tracker-module-metadata-utils.c
@@ -36,11 +36,11 @@
#include <libtracker-common/tracker-type-utils.h>
#include <libtracker-common/tracker-os-dependant.h>
#include <libtracker-common/tracker-ontology.h>
-#include <libtracker-common/tracker-thumbnailer.h>
#include "tracker-module-metadata-utils.h"
#include "tracker-extract-client.h"
#include "tracker-dbus.h"
+#include "tracker-thumbnailer.h"
#define THUMBNAIL_RETRIEVAL_ENABLED
#define HAVE_HILDON_THUMBNAIL
diff --git a/src/libtracker-common/tracker-thumbnailer.c b/src/tracker-miner-fs/tracker-thumbnailer.c
index 05ba30988..05ba30988 100644
--- a/src/libtracker-common/tracker-thumbnailer.c
+++ b/src/tracker-miner-fs/tracker-thumbnailer.c
diff --git a/src/libtracker-common/tracker-thumbnailer.h b/src/tracker-miner-fs/tracker-thumbnailer.h
index bddf30818..bddf30818 100644
--- a/src/libtracker-common/tracker-thumbnailer.h
+++ b/src/tracker-miner-fs/tracker-thumbnailer.h
diff --git a/src/tracker-store/tracker-volume-cleanup.c b/src/tracker-miner-fs/tracker-volume-cleanup.c
index 79230b113..2c2032b61 100644
--- a/src/tracker-store/tracker-volume-cleanup.c
+++ b/src/tracker-miner-fs/tracker-volume-cleanup.c
@@ -24,13 +24,13 @@
#include <gio/gio.h>
-#include <libtracker-common/tracker-thumbnailer.h>
#include <libtracker-common/tracker-utils.h>
#include <libtracker-common/tracker-type-utils.h>
#include <libtracker-db/tracker-db-manager.h>
#include <libtracker-data/tracker-data-update.h>
#include <libtracker-data/tracker-data-query.h>
+#include "tracker-thumbnailer.h"
#include "tracker-volume-cleanup.h"
/* Deals with cleaning up resident data after longer timeouts (days,
diff --git a/src/tracker-store/tracker-volume-cleanup.h b/src/tracker-miner-fs/tracker-volume-cleanup.h
index bcb974807..bcb974807 100644
--- a/src/tracker-store/tracker-volume-cleanup.h
+++ b/src/tracker-miner-fs/tracker-volume-cleanup.h
diff --git a/src/tracker-store/Makefile.am b/src/tracker-store/Makefile.am
index e6f31c7b5..d8cdf6cb9 100644
--- a/src/tracker-store/Makefile.am
+++ b/src/tracker-store/Makefile.am
@@ -27,6 +27,8 @@ INCLUDES = \
libexec_PROGRAMS = tracker-store
tracker_store_SOURCES = \
+ $(marshal_sources) \
+ $(dbus_sources) \
tracker-backup.c \
tracker-backup.h \
tracker-config.c \
@@ -37,11 +39,8 @@ tracker_store_SOURCES = \
tracker-events.h \
tracker-main.c \
tracker-main.h \
- tracker-marshal-main.c \
tracker-resources.c \
tracker-resources.h \
- tracker-volume-cleanup.c \
- tracker-volume-cleanup.h \
tracker-push.c \
tracker-push.h \
tracker-push-registrar.c \
@@ -73,18 +72,10 @@ tracker_store_LDADD = \
$(GLIB2_LIBS) \
$(RAPTOR_LIBS) \
$(GCOV_LIBS) \
- $(tracker_store_win_libs) \
+ $(tracker_store_win_libs) \
-lz \
-lm
-tracker-marshal.h: tracker-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --header > $@
-
-tracker-marshal.c: tracker-marshal.list
- $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --body > $@
-
-tracker-marshal-main.c: tracker-marshal.c tracker-marshal.h
-
marshal_sources = \
tracker-marshal.h \
tracker-marshal.c
@@ -95,6 +86,13 @@ dbus_sources = \
tracker-statistics-glue.h \
tracker-resources-class-glue.h
+tracker-marshal.h: tracker-marshal.list
+ $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --header > $@
+
+tracker-marshal.c: tracker-marshal.list
+ echo "#include \"tracker-marshal.h\"" > $@ && \
+ $(GLIB_GENMARSHAL) $< --prefix=tracker_marshal --body >> $@
+
%-glue.h: $(top_srcdir)/data/dbus/%.xml
$(DBUSBINDINGTOOL) --mode=glib-server --output=$@ --prefix=$(subst -,_,$*) $^
@@ -102,8 +100,8 @@ dbus_sources = \
$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=$(subst -,_,$*) $^
BUILT_SOURCES = \
- $(dbus_sources) \
- $(marshal_sources)
+ $(marshal_sources) \
+ $(dbus_sources)
CLEANFILES = $(BUILT_SOURCES)
diff --git a/src/tracker-store/tracker-main.c b/src/tracker-store/tracker-main.c
index 9df489df2..8519d920d 100644
--- a/src/tracker-store/tracker-main.c
+++ b/src/tracker-store/tracker-main.c
@@ -49,7 +49,6 @@
#include <libtracker-common/tracker-log.h>
#include <libtracker-common/tracker-module-config.h>
#include <libtracker-common/tracker-ontology.h>
-#include <libtracker-common/tracker-thumbnailer.h>
#include <libtracker-db/tracker-db-manager.h>
#include <libtracker-db/tracker-db-dbus.h>
@@ -64,7 +63,6 @@
#include "tracker-events.h"
#include "tracker-main.h"
#include "tracker-push.h"
-#include "tracker-volume-cleanup.h"
#include "tracker-backup.h"
#include "tracker-store.h"
#include "tracker-statistics.h"
@@ -751,7 +749,6 @@ main (gint argc, gchar *argv[])
tracker_store_init ();
tracker_turtle_init ();
- tracker_thumbnailer_init ();
flags |= TRACKER_DB_MANAGER_REMOVE_CACHE;
@@ -770,8 +767,6 @@ main (gint argc, gchar *argv[])
return EXIT_FAILURE;
}
- tracker_volume_cleanup_init ();
-
#ifdef HAVE_HAL
/* We set up the mount points here. For the mount points, this
* means contacting the Indexer. This means that we have to
@@ -824,11 +819,9 @@ shutdown:
tracker_push_shutdown ();
tracker_events_shutdown ();
- tracker_volume_cleanup_shutdown ();
tracker_dbus_shutdown ();
tracker_data_manager_shutdown ();
tracker_turtle_shutdown ();
- tracker_thumbnailer_shutdown ();
tracker_log_shutdown ();
#ifdef HAVE_HAL
diff --git a/src/tracker-store/tracker-marshal-main.c b/src/tracker-store/tracker-marshal-main.c
deleted file mode 100644
index 3ff573db1..000000000
--- a/src/tracker-store/tracker-marshal-main.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "tracker-marshal.h"
-#include "tracker-marshal.c"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c63cc6a7a..28d0a1188 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -6,4 +6,5 @@ SUBDIRS = \
libtracker-data \
libtracker-db \
tracker-miner-fs \
- tracker-extract
+ tracker-extract \
+ tracker-store
diff --git a/tests/libtracker-common/Makefile.am b/tests/libtracker-common/Makefile.am
index 3cb87752a..44aa4c843 100644
--- a/tests/libtracker-common/Makefile.am
+++ b/tests/libtracker-common/Makefile.am
@@ -17,8 +17,7 @@ noinst_PROGRAMS = $(TEST_PROGS)
TEST_PROGS += \
tracker-dbus \
tracker-type-utils \
- tracker-file-utils \
- tracker-thumbnailer
+ tracker-file-utils
INCLUDES = \
-DG_LOG_DOMAIN=\"Tracker\" \
@@ -92,17 +91,4 @@ tracker_file_utils_LDADD = \
# $(PANGO_LIBS) \
# $(GLIB2_LIBS)
-tracker_thumbnailer_SOURCES = \
- tracker-thumbnailer-test.c \
- mock-dbus-gproxy.c \
- mock-thumbnailer-dbus.c
-
-tracker_thumbnailer_LDADD = \
- $(top_builddir)/src/libtracker-common/libtracker-common.la \
- $(top_builddir)/tests/common/libtracker-testcommon.la \
- $(GMODULE_LIBS) \
- $(GCOV_LIBS) \
- $(GTHREAD_LIBS) \
- $(GLIB2_LIBS)
-
EXTRA_DIST = non-utf8.txt
diff --git a/tests/libtracker-common/tracker-thumbnailer-test.c b/tests/libtracker-common/tracker-thumbnailer-test.c
deleted file mode 100644
index 36c1f4e42..000000000
--- a/tests/libtracker-common/tracker-thumbnailer-test.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2008, Nokia (urho.konttori@nokia.com)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-#include "config.h"
-
-#include <stdlib.h>
-
-#include <glib-object.h>
-
-#include <libtracker-common/tracker-thumbnailer.h>
-
-static const gchar *old_xdg_config = NULL;
-
-static void
-set_config_directory ()
-{
- old_xdg_config = g_getenv ("XDG_CONFIG_HOME");
- g_setenv ("XDG_CONFIG_HOME", ".", TRUE);
-}
-
-static void
-restore_config_directory ()
-{
- g_setenv ("XDG_CONFIG_HOME", old_xdg_config, TRUE);
-}
-
-static void
-test_init_shutdown ()
-{
-
- tracker_thumbnailer_shutdown ();
-
- tracker_thumbnailer_init ();
- tracker_thumbnailer_shutdown ();
-
- tracker_thumbnailer_init ();
- tracker_thumbnailer_shutdown ();
-
- tracker_thumbnailer_shutdown ();
- tracker_thumbnailer_init ();
- tracker_thumbnailer_init ();
- tracker_thumbnailer_shutdown ();
-}
-
-static void
-test_queue_file ()
-{
- tracker_thumbnailer_init ();
-
- /* URI with supported mimetype */
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT)) {
- tracker_thumbnailer_queue_add ("file:///a/b/c.jpeg", "image/jpeg");
- }
- g_test_trap_assert_stdout ("*Thumbnailer queue appended with uri:'file:///a/b/c.jpeg', mime type:'image/jpeg', request_id:1...*");
-
-
- /* URI with unsupported mimetype */
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT)) {
- tracker_thumbnailer_queue_add ("file:///a/b/c.jpeg", "unsupported");
- exit (0);
- }
- g_test_trap_assert_passed ();
- g_test_trap_assert_stdout ("*Thumbnailer ignoring uri:'file:///a/b/c.jpeg', mime type:'unsupported'*");
-
-
- /* Path with supported mimetype */
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT)) {
- tracker_thumbnailer_queue_add ("/a/b/c.jpeg", "image/jpeg");
- }
- g_test_trap_assert_stdout ("*Thumbnailer queue appended with uri:'file:///a/b/c.jpeg', mime type:'image/jpeg', request_id:1...*");
-
-
- tracker_thumbnailer_shutdown ();
-}
-
-static void
-test_queue_send ()
-{
- gint i;
-
- tracker_thumbnailer_init ();
-
- for (i = 0; i < 10; i++) {
- gchar *filename = g_strdup_printf ("file:///a/b/c%d.jpeg", i);
- tracker_thumbnailer_queue_add (filename, "image/jpeg");
- }
-
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR)) {
- tracker_thumbnailer_queue_send ();
- }
- g_test_trap_assert_stderr ("*DBUS-CALL: Queue*");
- g_test_trap_assert_stderr ("*Thumbnailer queue sent with 10 items to thumbnailer daemon, request ID:10...*");
-
- tracker_thumbnailer_shutdown ();
-}
-
-static void
-test_move ()
-{
- tracker_thumbnailer_init ();
-
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
- tracker_thumbnailer_move ("file:///a/b/c1.jpeg", "image/jpeg",
- "file:///a/b/d1.jpeg");
- }
- g_test_trap_assert_stderr ("*DBUS-CALL: Move*");
- g_test_trap_assert_stdout ("*Thumbnailer request to move uri from:'file:///a/b/c1.jpeg' to:'file:///a/b/d1.jpeg', request_id:1...*");
- tracker_thumbnailer_shutdown ();
-}
-
-static void
-test_remove ()
-{
- tracker_thumbnailer_init ();
-
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
- tracker_thumbnailer_remove ("file:///a/b/c1.jpeg", "image/jpeg");
- }
- g_test_trap_assert_stderr ("*DBUS-CALL: Delete*");
- g_test_trap_assert_stdout ("*Thumbnailer request to remove uri:'file:///a/b/c1.jpeg', request_id:1...*");
-
- tracker_thumbnailer_shutdown ();
-}
-
-static void
-test_cleanup ()
-{
- tracker_thumbnailer_init ();
-
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR)) {
- tracker_thumbnailer_cleanup ("file:///a/b/c1.jpeg");
- }
- g_test_trap_assert_stderr ("*DBUS-CALL: Cleanup*");
- g_test_trap_assert_stdout ("*Thumbnailer cleaning up uri:'file:///a/b/c1.jpeg', request_id:1...*");
-
- tracker_thumbnailer_shutdown ();
-}
-
-gint
-main (gint argc, gchar **argv)
-{
- gint result;
-
- g_type_init ();
- g_test_init (&argc, &argv, NULL);
-
- set_config_directory ();
-
- g_test_add_func ("/libtracker-common/tracker-thumbnailer/init_shutdown",
- test_init_shutdown);
- g_test_add_func ("/libtracker-common/tracker-thumbnailer/queue_file",
- test_queue_file);
- g_test_add_func ("/libtracker-common/tracker-thumbnailer/queue_send",
- test_queue_send);
- g_test_add_func ("/libtracker-common/tracker-thumbnailer/move",
- test_move);
- g_test_add_func ("/libtracker-common/tracker-thumbnailer/remove",
- test_remove);
- g_test_add_func ("/libtracker-common/tracker-thumbnailer/cleanup",
- test_cleanup);
-
- result = g_test_run ();
-
- restore_config_directory ();
-
- return result;
-}
diff --git a/tests/tracker-miner-fs/Makefile.am b/tests/tracker-miner-fs/Makefile.am
index 16ba1b7c0..cc7dd298b 100644
--- a/tests/tracker-miner-fs/Makefile.am
+++ b/tests/tracker-miner-fs/Makefile.am
@@ -2,8 +2,7 @@ include $(top_srcdir)/Makefile.decl
noinst_PROGRAMS = $(TEST_PROGS)
-TEST_PROGS += tracker-metadata-utils \
- tracker-events
+TEST_PROGS += tracker-metadata-utils
INCLUDES = \
-DTEST \
@@ -25,15 +24,13 @@ INCLUDES = \
$(DBUS_CFLAGS) \
$(RAPTOR_CFLAGS)
-
tracker_metadata_utils_SOURCES = \
- $(top_srcdir)/src/tracker-store/tracker-events.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-dbus.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-config.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-crawler.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-indexer.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-indexer-module.c \
- $(top_srcdir)/src/tracker-miner-fs/tracker-marshal-main.c \
+ $(top_srcdir)/src/tracker-miner-fs/tracker-marshal.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-module-metadata-utils.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-module-file.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-module-iteratable.c \
@@ -41,6 +38,7 @@ tracker_metadata_utils_SOURCES = \
$(top_srcdir)/src/tracker-miner-fs/tracker-processor.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-removable-device.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-status.c \
+ $(top_srcdir)/src/tracker-miner-fs/tracker-thumbnailer.c \
$(top_srcdir)/src/tracker-miner-fs/tracker-utils.c \
tracker-metadata-utils-test.c
@@ -59,15 +57,3 @@ tracker_metadata_utils_LDADD = \
$(GCOV_LIBS) \
$(RAPTOR_LIBS) \
$(GLIB2_LIBS)
-
-tracker_events_SOURCES = \
- tracker-events-test.c \
- $(top_srcdir)/src/tracker-store/tracker-events.c
-
-tracker_events_LDADD = \
- $(top_builddir)/src/libtracker-common/libtracker-common.la \
- $(DBUS_LIBS) \
- $(GCOV_LIBS) \
- $(GMODULE_LIBS) \
- $(GTHREAD_LIBS) \
- $(GLIB2_LIBS)
diff --git a/tests/tracker-store/Makefile.am b/tests/tracker-store/Makefile.am
new file mode 100644
index 000000000..08f2e272e
--- /dev/null
+++ b/tests/tracker-store/Makefile.am
@@ -0,0 +1,36 @@
+include $(top_srcdir)/Makefile.decl
+
+noinst_PROGRAMS = $(TEST_PROGS)
+
+# TEST_PROGS += tracker-events
+
+INCLUDES = \
+ -DTEST \
+ -DG_LOG_DOMAIN=\"Tracker\" \
+ -DPKGLIBDIR=\""$(libdir)/tracker-$(TRACKER_API_VERSION)"\" \
+ -DLIBEXEC_PATH=\""$(libexecdir)"\" \
+ -DTRACKER_COMPILATION \
+ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/tests/common \
+ -I$(top_builddir)/src/tracker-store \
+ -I$(top_builddir)/src/tracker-miner-fs \
+ $(WARN_CFLAGS) \
+ $(GLIB2_CFLAGS) \
+ $(GCOV_CFLAGS) \
+ $(GMODULE_CFLAGS) \
+ $(GTHREAD_CFLAGS) \
+ $(PANGO_CFLAGS) \
+ $(DBUS_CFLAGS) \
+ $(RAPTOR_CFLAGS)
+
+tracker_events_SOURCES = \
+ $(top_srcdir)/src/tracker-store/tracker-events.c \
+ tracker-events-test.c
+
+tracker_events_LDADD = \
+ $(top_builddir)/src/libtracker-common/libtracker-common.la \
+ $(DBUS_LIBS) \
+ $(GCOV_LIBS) \
+ $(GMODULE_LIBS) \
+ $(GTHREAD_LIBS) \
+ $(GLIB2_LIBS)
diff --git a/tests/tracker-miner-fs/tracker-events-test.c b/tests/tracker-store/tracker-events-test.c
index 605318d4f..605318d4f 100644
--- a/tests/tracker-miner-fs/tracker-events-test.c
+++ b/tests/tracker-store/tracker-events-test.c