#define RELOAD_READ_END 0
#define RELOAD_WRITE_END 1
-static void close_reload_pipe (void);
+static void close_reload_pipe (DBusWatch **);
-#ifdef DBUS_UNIX
+#ifdef DBUS_UNIX
+ typedef enum
+ {
+ ACTION_RELOAD = 'r',
+ ACTION_QUIT = 'q'
+ } SignalAction;
+
static void
signal_handler (int sig)
{
_dbus_read_socket (reload_pipe[RELOAD_READ_END], &str, 1) != 1)
{
_dbus_warn ("Couldn't read from reload pipe.\n");
- close_reload_pipe ();
+ close_reload_pipe (&watch);
return TRUE;
}
+
+ action_str = _dbus_string_get_data (&str);
+ if (action_str != NULL)
+ {
+ action = action_str[0];
+ }
_dbus_string_free (&str);
/* this can only fail if we don't understand the config file
noinst_PROGRAMS= $(TEST_BINARIES)
-test_service_SOURCES= \
- test-service.c
-
-test_names_SOURCES= \
- test-names.c
-
-##break_loader_SOURCES= \
-## break-loader.c
-
-test_shell_service_SOURCES = \
- test-shell-service.c
-
-shell_test_SOURCES= \
- shell-test.c
-
-spawn_test_SOURCES= \
- spawn-test.c
-
-test_exit_SOURCES = \
- test-exit.c
-
-test_segfault_SOURCES = \
- test-segfault.c
-
-test_sleep_forever_SOURCES = \
- test-sleep-forever.c
-
-# This assumes that most tests will be linked to libdbus-internal;
-# tests linked to only the public libdbus have their own CPPFLAGS.
-AM_CPPFLAGS=-DDBUS_STATIC_BUILD
-TEST_LIBS=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS)
+static_cppflags = \
+ $(AM_CPPFLAGS) \
+ -DDBUS_STATIC_BUILD \
+ $(NULL)
-test_service_LDADD=libdbus-testutils.la $(TEST_LIBS)
-test_service_LDFLAGS=@R_DYNAMIC_LDFLAG@
-test_names_LDADD=libdbus-testutils.la $(TEST_LIBS)
-test_names_LDFLAGS=@R_DYNAMIC_LDFLAG@
-## break_loader_LDADD= $(TEST_LIBS)
-## break_loader_LDFLAGS=@R_DYNAMIC_LDFLAG@
-test_shell_service_LDADD=libdbus-testutils.la $(TEST_LIBS)
-test_shell_service_LDFLAGS=@R_DYNAMIC_LDFLAG@
-shell_test_LDADD=libdbus-testutils.la $(TEST_LIBS)
-shell_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
-spawn_test_LDADD=$(TEST_LIBS)
-spawn_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
+test_service_CPPFLAGS = $(static_cppflags)
+test_service_LDADD = libdbus-testutils.la
+test_names_CPPFLAGS = $(static_cppflags)
+test_names_LDADD = libdbus-testutils.la
+## break_loader_CPPFLAGS = $(static_cppflags)
+## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la
+test_shell_service_CPPFLAGS = $(static_cppflags)
+test_shell_service_LDADD = libdbus-testutils.la
+shell_test_CPPFLAGS = $(static_cppflags)
+shell_test_LDADD = libdbus-testutils.la
+spawn_test_CPPFLAGS = $(static_cppflags)
+spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la
-test_refs_CPPFLAGS = -DDBUS_STATIC_BUILD $(GLIB_CFLAGS)
-test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS) $(TEST_LIBS)
+ test_refs_SOURCES = internals/refs.c
++test_refs_CPPFLAGS = $(static_cppflags)
++test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS)
+
EXTRA_DIST = dbus-test-runner
testexecdir = $(libdir)/dbus-1.0/test
installable_tests = \
test-corrupt \
test-dbus-daemon \
+ test-dbus-daemon-eavesdrop \
test-loopback \
test-marshal \
+ test-refs \
test-relay \
$(NULL)