From 73b926275f7208f4663771b98a580f10e3aebb18 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 1 Dec 2009 11:17:17 +0100 Subject: [PATCH] uses tcp based test connections for now --- bus/config-parser.c | 10 ++++++++++ bus/dispatch.c | 22 ++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/bus/config-parser.c b/bus/config-parser.c index a4a0191..d8ae459 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -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; diff --git a/bus/dispatch.c b/bus/dispatch.c index 9ad494b..f769a44 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -40,6 +40,12 @@ #include #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"); -- 2.7.4