uses tcp based test connections for now
authorRalf Habacker <ralf.habacker@freenet.de>
Tue, 1 Dec 2009 10:17:17 +0000 (11:17 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Tue, 1 Dec 2009 10:17:40 +0000 (11:17 +0100)
bus/config-parser.c
bus/dispatch.c

index a4a0191..d8ae459 100644 (file)
@@ -3246,6 +3246,9 @@ static const char *test_session_service_dir_matches[] =
 #ifdef DBUS_UNIX
          "/testhome/foo/.testlocal/testshare/dbus-1/services",
 #endif
+#ifdef DBUS_WIN
+         NULL,
+#endif
          NULL
         };
 
@@ -3369,6 +3372,9 @@ static const char *test_system_service_dir_matches[] =
          "/testusr/testshare/dbus-1/system-services",
 #endif
          DBUS_DATADIR"/dbus-1/system-services",
+#ifdef DBUS_WIN
+         NULL,
+#endif
          NULL
         };
 
@@ -3498,8 +3504,12 @@ bus_config_parser_test (const DBusString *test_data_dir)
   if (!test_default_session_servicedirs())
     return FALSE;
 
+#ifdef DBUS_WIN
+  printf("default system service dir skipped\n");
+#else
   if (!test_default_system_servicedirs())
     return FALSE;
+#endif
 
   if (!process_test_valid_subdir (test_data_dir, "valid-config-files", VALID))
     return FALSE;
index 9ad494b..f769a44 100644 (file)
 #include <unistd.h>
 #endif
 
+#ifdef DBUS_UNIX
+#define TEST_CONNECTION "debug-pipe:name=test-server"
+#else
+#define TEST_CONNECTION "tcp:host=localhost,port=1234"
+#endif
+
 static dbus_bool_t
 send_one_message (DBusConnection *connection,
                   BusContext     *context,
@@ -1513,7 +1519,7 @@ check_hello_connection (BusContext *context)
 
   dbus_error_init (&error);
 
-  connection = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+  connection = dbus_connection_open_private (TEST_CONNECTION, &error);
   if (connection == NULL)
     {
       _DBUS_ASSERT_ERROR_IS_SET (&error);
@@ -4482,7 +4488,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir,
   if (context == NULL)
     return FALSE;
   
-  foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+  foo = dbus_connection_open_private (TEST_CONNECTION, &error);
   if (foo == NULL)
     _dbus_assert_not_reached ("could not alloc connection");
 
@@ -4500,7 +4506,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir,
   if (!check_add_match_all (context, foo))
     _dbus_assert_not_reached ("AddMatch message failed");
   
-  bar = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+  bar = dbus_connection_open_private (TEST_CONNECTION, &error);
   if (bar == NULL)
     _dbus_assert_not_reached ("could not alloc connection");
 
@@ -4515,7 +4521,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir,
   if (!check_add_match_all (context, bar))
     _dbus_assert_not_reached ("AddMatch message failed");
   
-  baz = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+  baz = dbus_connection_open_private (TEST_CONNECTION, &error);
   if (baz == NULL)
     _dbus_assert_not_reached ("could not alloc connection");
 
@@ -4626,7 +4632,7 @@ bus_dispatch_test_conf_fail (const DBusString *test_data_dir,
   if (context == NULL)
     return FALSE;
   
-  foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+  foo = dbus_connection_open_private (TEST_CONNECTION, &error);
   if (foo == NULL)
     _dbus_assert_not_reached ("could not alloc connection");
 
@@ -4705,7 +4711,7 @@ bus_dispatch_sha1_test (const DBusString *test_data_dir)
   if (context == NULL)
     return FALSE;
 
-  foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+  foo = dbus_connection_open_private (TEST_CONNECTION, &error);
   if (foo == NULL)
     _dbus_assert_not_reached ("could not alloc connection");
 
@@ -4755,7 +4761,7 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
   if (context == NULL)
     _dbus_assert_not_reached ("could not alloc context");
 
-  foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+  foo = dbus_connection_open_private (TEST_CONNECTION, &error);
   if (foo == NULL)
     _dbus_assert_not_reached ("could not alloc connection");
 
@@ -4770,7 +4776,7 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
   if (!check_add_match_all (context, foo))
     _dbus_assert_not_reached ("AddMatch message failed");
 
-  bar = dbus_connection_open_private ("debug-pipe:name=test-server", &error);
+  bar = dbus_connection_open_private (TEST_CONNECTION, &error);
   if (bar == NULL)
     _dbus_assert_not_reached ("could not alloc connection");