mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-08 19:38:01 +02:00
bus tests: Skip unsupported fd-passing test internally, not from main()
This results in one less special case in test-main, which will be significant when we want to make the tests more data-driven. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
4587be1442
commit
9c4f9206c4
3 changed files with 4 additions and 11 deletions
|
|
@ -5098,11 +5098,10 @@ bus_dispatch_sha1_test (const char *test_data_dir_cstr)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef HAVE_UNIX_FD_PASSING
|
||||
|
||||
dbus_bool_t
|
||||
bus_unix_fds_passing_test (const char *test_data_dir_cstr)
|
||||
{
|
||||
#ifdef HAVE_UNIX_FD_PASSING
|
||||
DBusString test_data_dir;
|
||||
BusContext *context;
|
||||
DBusConnection *foo, *bar;
|
||||
|
|
@ -5248,8 +5247,10 @@ bus_unix_fds_passing_test (const char *test_data_dir_cstr)
|
|||
|
||||
bus_context_unref (context);
|
||||
|
||||
#else
|
||||
_dbus_test_skip ("fd-passing not supported on this platform");
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
|
||||
|
|
|
|||
|
|
@ -120,12 +120,7 @@ main (int argc, char **argv)
|
|||
test_one ("dispatch", bus_dispatch_test, dir);
|
||||
test_one ("activation-service-reload",
|
||||
bus_activation_service_reload_test, dir);
|
||||
|
||||
#ifdef HAVE_UNIX_FD_PASSING
|
||||
test_one ("unix-fds-passing", bus_unix_fds_passing_test, dir);
|
||||
#else
|
||||
_dbus_test_skip ("fd-passing not supported on this platform");
|
||||
#endif
|
||||
|
||||
return _dbus_test_done_testing ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,10 +50,7 @@ void bus_test_run_clients_loop (dbus_bool_t block);
|
|||
void bus_test_run_everything (BusContext *context);
|
||||
BusContext* bus_context_new_test (const DBusString *test_data_dir,
|
||||
const char *filename);
|
||||
|
||||
#ifdef HAVE_UNIX_FD_PASSING
|
||||
dbus_bool_t bus_unix_fds_passing_test (const char *test_data_dir_cstr);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue