[tracker/gdbus-porting-rebased] tests: libtracker-miner: Disable a few tests that try to ELF override dbus-glib API



commit 48055904220092705831ea16840c265942656a1d
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Jan 12 15:41:25 2011 +0100

    tests: libtracker-miner: Disable a few tests that try to ELF override dbus-glib API

 tests/libtracker-miner/miners-mock.c               |    7 +++++++
 tests/libtracker-miner/thumbnailer-mock.c          |    8 ++++++--
 .../libtracker-miner/tracker-miner-manager-test.c  |    9 ++++++++-
 tests/libtracker-miner/tracker-thumbnailer-test.c  |   13 +++++++++++--
 4 files changed, 32 insertions(+), 5 deletions(-)
---
diff --git a/tests/libtracker-miner/miners-mock.c b/tests/libtracker-miner/miners-mock.c
index fa11fac..5c211a3 100644
--- a/tests/libtracker-miner/miners-mock.c
+++ b/tests/libtracker-miner/miners-mock.c
@@ -19,7 +19,9 @@
 
 #include <glib-object.h>
 #include <gobject/gvaluecollector.h>
+#if 0
 #include <dbus/dbus-glib.h>
+#endif
 #include "empty-gobject.h"
 #include "miners-mock.h"
 #include "tracker-miner-mock.h"
@@ -47,6 +49,9 @@ miners_mock_init ()
 /*
  * DBus overrides
  */
+#if 0
+/* Todo: port to gdbus */
+
 DBusGConnection *
 dbus_g_bus_get (DBusBusType type, GError **error)
 {
@@ -271,3 +276,5 @@ dbus_g_connection_unref (DBusGConnection *conn)
 	/* It is an EmptyGObject */
 	g_object_unref (conn);
 }
+
+#endif
diff --git a/tests/libtracker-miner/thumbnailer-mock.c b/tests/libtracker-miner/thumbnailer-mock.c
index 13947c6..79c7cd5 100644
--- a/tests/libtracker-miner/thumbnailer-mock.c
+++ b/tests/libtracker-miner/thumbnailer-mock.c
@@ -19,7 +19,9 @@
 
 #include <glib-object.h>
 #include <gobject/gvaluecollector.h>
+#if 0
 #include <dbus/dbus-glib.h>
+#endif
 #include "empty-gobject.h"
 #include "thumbnailer-mock.h"
 
@@ -41,6 +43,8 @@ dbus_mock_call_log_get ()
 	return calls;
 }
 
+#if 0
+
 static void
 dbus_mock_call_log_append (const gchar *function_name)
 {
@@ -48,7 +52,7 @@ dbus_mock_call_log_append (const gchar *function_name)
 }
 
 
-
+/* Port to gdbus */
 /*
  * DBus overrides
  */
@@ -127,5 +131,5 @@ dbus_g_proxy_call_no_reply (DBusGProxy        *proxy,
 {
 	dbus_mock_call_log_append (method);
 }
-
+#endif
 
diff --git a/tests/libtracker-miner/tracker-miner-manager-test.c b/tests/libtracker-miner/tracker-miner-manager-test.c
index 53c882e..517c201 100644
--- a/tests/libtracker-miner/tracker-miner-manager-test.c
+++ b/tests/libtracker-miner/tracker-miner-manager-test.c
@@ -31,6 +31,9 @@
 
 TrackerMinerManager *manager = NULL;
 
+#if 0
+/* Todo: port miners-mock.c first */
+
 static void
 test_miner_manager_get_running () 
 {
@@ -126,6 +129,8 @@ test_miner_manager_get_status ()
         g_assert (tracker_miner_manager_get_status (manager, MOCK_MINER_1, &status, &progress));
 }
 
+#endif
+
 int
 main (int    argc,
       char **argv)
@@ -141,7 +146,8 @@ main (int    argc,
         miners_mock_init ();
         g_setenv ("TRACKER_MINERS_DIR", TEST_MINERS_DIR, TRUE);
         manager = tracker_miner_manager_new ();
-
+#if 0
+	/* Todo: port miners-mock.c first */
 	g_test_add_func ("/libtracker-miner/tracker-miner-manager/get_running",
                          test_miner_manager_get_running);
 
@@ -162,6 +168,7 @@ main (int    argc,
 
         g_test_add_func ("/libtracker-miner/tracker-miner-manager/status",
                          test_miner_manager_get_status);
+#endif
 
         result = g_test_run ();
         
diff --git a/tests/libtracker-miner/tracker-thumbnailer-test.c b/tests/libtracker-miner/tracker-thumbnailer-test.c
index e510f61..0abd808 100644
--- a/tests/libtracker-miner/tracker-thumbnailer-test.c
+++ b/tests/libtracker-miner/tracker-thumbnailer-test.c
@@ -22,6 +22,8 @@
 #include <libtracker-miner/tracker-miner.h>
 #include "thumbnailer-mock.h"
 
+#if 0
+/* port thumbnailer-mock.c to gdbus first */
 
 static void
 test_thumbnailer_init ()
@@ -55,7 +57,6 @@ test_thumbnailer_send_moves ()
         dbus_mock_call_log_reset ();
 
         tracker_thumbnailer_init ();
-
         /* Returns TRUE, but there is no dbus call */
         g_assert (tracker_thumbnailer_move_add ("file://a.jpeg", "mock/one", "file://b.jpeg"));
         g_assert (dbus_mock_call_log_get () == NULL);
@@ -82,6 +83,7 @@ test_thumbnailer_send_removes ()
         
         dbus_mock_call_log_reset ();
 
+
         tracker_thumbnailer_init ();
 
         /* Returns TRUE, but there is no dbus call */
@@ -124,6 +126,8 @@ test_thumbnailer_send_cleanup ()
         dbus_mock_call_log_reset ();
 }
 
+#endif
+
 int
 main (int    argc,
       char **argv)
@@ -132,7 +136,10 @@ main (int    argc,
 	g_thread_init (NULL);
 	g_test_init (&argc, &argv, NULL);
 
-	g_test_message ("Testing filesystem crawler");
+	g_test_message ("Testing thumbnailer");
+
+#if 0
+/* port thumbnailer-mock.c to gdbus first */
 
 	g_test_add_func ("/libtracker-miner/tracker-thumbnailer/init",
 	                 test_thumbnailer_init);
@@ -145,5 +152,7 @@ main (int    argc,
         g_test_add_func ("/libtracker-minter/tracker-thumbnailer/send_cleanup",
                          test_thumbnailer_send_cleanup);
 
+#endif
+
 	return g_test_run ();
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]