uses tcp based test connections for now

This commit is contained in:
Ralf Habacker 2009-12-01 11:17:17 +01:00
parent 0992fb826d
commit 73b926275f
2 changed files with 24 additions and 8 deletions

View file

@ -3245,6 +3245,9 @@ static const char *test_session_service_dir_matches[] =
DBUS_DATADIR"/dbus-1/services",
#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;

View file

@ -40,6 +40,12 @@
#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");