g_test_add ("/corrupt/byte-order/tcp", Fixture, "tcp:host=127.0.0.1", setup,
test_byte_order, teardown);
+#ifdef DBUS_UNIX
+ g_test_add ("/corrupt/byte-order/unix", Fixture, "unix:tmpdir=/tmp", setup,
+ test_byte_order, teardown);
+#endif
+
return g_test_run ();
}
dbus_error_init (&f->e);
+#ifdef DBUS_UNIX
+ f->server = dbus_server_listen ("unix:tmpdir=/tmp", &f->e);
+#else
f->server = dbus_server_listen ("tcp:host=127.0.0.1", &f->e);
+#endif
+
assert_no_error (&f->e);
g_assert (f->server != NULL);
add_oom_test ("/server/new-nonce-tcp", test_new_server, "nonce-tcp:host=localhost,bind=localhost");
add_oom_test ("/server/new-tcp-star", test_new_server, "tcp:host=localhost,bind=*");
add_oom_test ("/server/new-tcp-v4", test_new_server, "tcp:host=localhost,bind=localhost,family=ipv4");
+#ifdef DBUS_UNIX
+ add_oom_test ("/server/unix", test_new_server, "unix:tmpdir=/tmp");
+#endif
ret = g_test_run ();
g_test_add ("/message/nonce-tcp", Fixture, "nonce-tcp:host=127.0.0.1", setup,
test_message, teardown);
+ g_test_add ("/message/bad-guid/tcp", Fixture, "tcp:host=127.0.0.1", setup,
+ test_bad_guid, teardown);
+
#ifdef DBUS_UNIX
g_test_add ("/connect/unix/tmpdir", Fixture, "unix:tmpdir=/tmp", setup,
test_connect, teardown);
g_test_add ("/connect/unix/no-runtime", Fixture,
"unix:runtime=yes;unix:tmpdir=/tmp", setup_no_runtime, test_connect,
teardown_no_runtime);
-#endif
- g_test_add ("/message/bad-guid", Fixture, "tcp:host=127.0.0.1", setup,
+ g_test_add ("/message/bad-guid/unix", Fixture, "unix:tmpdir=/tmp", setup,
test_bad_guid, teardown);
+#endif
return g_test_run ();
}
static void
setup (Fixture *f,
- gconstpointer data G_GNUC_UNUSED)
+ gconstpointer address)
{
test_timeout_reset (1);
dbus_error_init (&f->e);
g_queue_init (&f->messages);
- f->server = dbus_server_listen ("tcp:host=127.0.0.1", &f->e);
+ f->server = dbus_server_listen (address, &f->e);
assert_no_error (&f->e);
g_assert (f->server != NULL);
{
test_init (&argc, &argv);
- g_test_add ("/connect", Fixture, NULL, setup,
+ g_test_add ("/connect/tcp", Fixture, "tcp:host=127.0.0.1", setup,
+ test_connect, teardown);
+ g_test_add ("/relay/tcp", Fixture, "tcp:host=127.0.0.1", setup,
+ test_relay, teardown);
+ g_test_add ("/limit/tcp", Fixture, "tcp:host=127.0.0.1", setup,
+ test_limit, teardown);
+
+#ifdef DBUS_UNIX
+ g_test_add ("/connect/unix", Fixture, "unix:tmpdir=/tmp", setup,
test_connect, teardown);
- g_test_add ("/relay", Fixture, NULL, setup,
+ g_test_add ("/relay/unix", Fixture, "unix:tmpdir=/tmp", setup,
test_relay, teardown);
- g_test_add ("/limit", Fixture, NULL, setup,
+ g_test_add ("/limit/unix", Fixture, "unix:tmpdir=/tmp", setup,
test_limit, teardown);
+#endif
return g_test_run ();
}