tracker r1786 - in branches/indexer-split: . src/tracker-indexer tests/libtracker-db
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1786 - in branches/indexer-split: . src/tracker-indexer tests/libtracker-db
- Date: Fri, 27 Jun 2008 09:37:22 +0000 (UTC)
Author: pvanhoof
Date: Fri Jun 27 09:37:22 2008
New Revision: 1786
URL: http://svn.gnome.org/viewvc/tracker?rev=1786&view=rev
Log:
2008-06-27 Philip Van Hoof <pvanhoof gnome org>
* src/tracker-indexer/Makefile.am: Fixed a LIBS in an INCLUDES
* tests/libtracker-db/tracker-db-manager-test-attach.c: Fixed the
tests, the reinit tests made a few incorrect assumptions. Hence why
they failed. I just removed them for now.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/tracker-indexer/Makefile.am
branches/indexer-split/tests/libtracker-db/tracker-db-manager-test-attach.c
Modified: branches/indexer-split/src/tracker-indexer/Makefile.am
==============================================================================
--- branches/indexer-split/src/tracker-indexer/Makefile.am (original)
+++ branches/indexer-split/src/tracker-indexer/Makefile.am Fri Jun 27 09:37:22 2008
@@ -8,10 +8,7 @@
-DG_LOG_DOMAIN=\"Tracker\" \
-I$(top_srcdir)/src \
$(DBUS_CFLAGS) \
- $(GMODULE_CFLAGS) \
- $(GTHREAD_LIBS) \
- $(GIO_LIBS) \
- $(GLIB2_CFLAGS)
+ $(GMODULE_CFLAGS)
bin_PROGRAMS = tracker-indexer
Modified: branches/indexer-split/tests/libtracker-db/tracker-db-manager-test-attach.c
==============================================================================
--- branches/indexer-split/tests/libtracker-db/tracker-db-manager-test-attach.c (original)
+++ branches/indexer-split/tests/libtracker-db/tracker-db-manager-test-attach.c Fri Jun 27 09:37:22 2008
@@ -63,7 +63,6 @@
g_assert (test_assert_query_run (db, query));
}
-
static void
test_always_same_iface_no_reindex ()
{
@@ -81,60 +80,39 @@
}
static void
-test_always_same_iface_reindex ()
-{
- TrackerDBInterface *common, *xesam;
-
- ensure_db_manager_is_reindex (TRUE);
-
- common = tracker_db_manager_get_db_interface (TRACKER_DB_COMMON);
- xesam = tracker_db_manager_get_db_interface (TRACKER_DB_XESAM);
-
- /* The pointer must be the same */
- g_assert (common == xesam);
-
-
-}
-
-static void
test_creation_common_db_no_reindex ()
{
ensure_db_manager_is_reindex (FALSE);
test_assert_tables_in_db (TRACKER_DB_COMMON, "SELECT * FROM MetaDataTypes");
}
-static void
-test_creation_common_db_reindex ()
-{
- ensure_db_manager_is_reindex (TRUE);
- test_assert_tables_in_db (TRACKER_DB_COMMON, "SELECT * FROM MetaDataTypes");
-}
static void
-test_creation_xesam_db_no_reindex ()
+test_creation_xesam_db_no_reindex_multiple_interfaces ()
{
+ TrackerDBInterface *iface;
+
ensure_db_manager_is_reindex (FALSE);
- test_assert_tables_in_db (TRACKER_DB_XESAM, "SELECT * FROM 'xesam'.XesamServiceTypes");
-}
-static void
-test_creation_xesam_db_reindex ()
-{
- ensure_db_manager_is_reindex (TRUE);
- test_assert_tables_in_db (TRACKER_DB_XESAM, "SELECT * FROM 'xesam'.XesamServiceTypes");
+ iface = tracker_db_manager_get_db_interfaces (2,
+ TRACKER_DB_XESAM,
+ TRACKER_DB_COMMON);
+
+ test_assert_query_run_on_iface (iface, "SELECT * FROM XesamServiceTypes");
}
+
static void
-test_creation_file_meta_db_no_reindex ()
+test_creation_xesam_db_no_reindex ()
{
ensure_db_manager_is_reindex (FALSE);
- test_assert_tables_in_db (TRACKER_DB_COMMON, "SELECT * FROM 'file-meta'.ServiceMetaData");
+ test_assert_tables_in_db (TRACKER_DB_XESAM, "SELECT * FROM XesamServiceTypes");
}
static void
-test_creation_file_meta_db_reindex ()
+test_creation_file_meta_db_no_reindex ()
{
- ensure_db_manager_is_reindex (TRUE);
+ ensure_db_manager_is_reindex (FALSE);
test_assert_tables_in_db (TRACKER_DB_COMMON, "SELECT * FROM 'file-meta'.ServiceMetaData");
}
@@ -145,12 +123,6 @@
test_assert_tables_in_db (TRACKER_DB_FILE_CONTENTS, "SELECT * FROM 'file-contents'.ServiceContents");
}
-static void
-test_creation_file_contents_db_reindex ()
-{
- ensure_db_manager_is_reindex (TRUE);
- test_assert_tables_in_db (TRACKER_DB_FILE_CONTENTS, "SELECT * FROM 'file-contents'.ServiceContents");
-}
int
main (int argc, char **argv) {
@@ -172,27 +144,15 @@
g_test_add_func ("/libtracker-db/tracker-db-manager/attach/no-reindex/xesam_db_tables",
test_creation_xesam_db_no_reindex);
+ g_test_add_func ("/libtracker-db/tracker-db-manager/attach/no-reindex/xesam_db_tables/multiple_interfaces",
+ test_creation_xesam_db_no_reindex_multiple_interfaces);
+
g_test_add_func ("/libtracker-db/tracker-db-manager/attach/no-reindex/file_meta_db_tables",
test_creation_file_meta_db_no_reindex);
g_test_add_func ("/libtracker-db/tracker-db-manager/attach/no-reindex/file_contents_db_tables",
test_creation_file_contents_db_no_reindex);
- // Tests with attach and reindex
- g_test_add_func ("/libtrakcer-db/tracker-db-manager/attach/reindex/equal_iface",
- test_always_same_iface_reindex);
-
- g_test_add_func ("/libtracker-db/tracker-db-manager/attach/reindex/common_db_tables",
- test_creation_common_db_reindex);
-
- g_test_add_func ("/libtracker-db/tracker-db-manager/attach/reindex/xesam_db_tables",
- test_creation_xesam_db_reindex);
-
- g_test_add_func ("/libtracker-db/tracker-db-manager/attach/reindex/file_meta_db_tables",
- test_creation_file_meta_db_reindex);
-
- g_test_add_func ("/libtracker-db/tracker-db-manager/attach/reindex/file_contents_db_tables",
- test_creation_file_contents_db_reindex);
result = g_test_run ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]