Commit 382cb17d authored by Simon McVittie's avatar Simon McVittie

Disable activation tests on Windows builds

These rely on the --systemd-activation code path, which is not
compiled for Windows.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92538Reviewed-by: Ralf Habacker's avatarRalf Habacker <ralf.habacker@freenet.de>
parent 12214344
......@@ -151,11 +151,17 @@ installable_tests += \
test-marshal \
test-refs \
test-relay \
test-sd-activation \
test-syntax \
test-syslog \
test-uid-permissions \
$(NULL)
if DBUS_UNIX
installable_tests += \
test-sd-activation \
$(NULL)
endif DBUS_UNIX
installable_manual_tests += \
manual-authz \
$(NULL)
......@@ -216,6 +222,7 @@ test_dbus_daemon_eavesdrop_LDADD = \
$(GLIB_LIBS) \
$(NULL)
if DBUS_UNIX
test_sd_activation_SOURCES = \
sd-activation.c \
$(NULL)
......@@ -223,6 +230,7 @@ test_sd_activation_LDADD = \
libdbus-testutils.la \
$(GLIB_LIBS) \
$(NULL)
endif
test_marshal_SOURCES = marshal.c
test_marshal_LDADD = \
......
......@@ -128,11 +128,13 @@ static Config no_eavesdrop_config = {
FALSE
};
#ifdef DBUS_UNIX
static Config fake_systemd_config = {
"valid-config-files/systemd-activation.conf",
NULL,
FALSE
};
#endif
static Config side_effects_config = {
NULL,
......@@ -1158,6 +1160,8 @@ test_selective (Fixture *f,
g_assert (m == NULL);
}
#ifdef DBUS_UNIX
/* currently only used for the systemd activation test */
static void
expect_new_connection (Fixture *f)
{
......@@ -1184,6 +1188,7 @@ expect_new_connection (Fixture *f)
dbus_message_unref (m);
}
/* currently only used for the systemd activation test */
static void
take_well_known_name (Fixture *f,
DBusConnection *connection,
......@@ -1197,6 +1202,7 @@ take_well_known_name (Fixture *f,
g_assert_cmpint (ret, ==, DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER);
}
/* currently only used for the systemd activation test */
static void
expect_take_well_known_name (Fixture *f,
DBusConnection *connection,
......@@ -1426,6 +1432,7 @@ test_activation (Fixture *f,
"com.example.Nope");
dbus_message_unref (m);
}
#endif /* DBUS_UNIX */
static void
teardown (Fixture *f,
......@@ -1516,8 +1523,12 @@ main (int argc,
setup, test_unicast_signal, teardown);
g_test_add ("/monitor/no-eavesdrop", Fixture, &no_eavesdrop_config,
setup, test_unicast_signal, teardown);
#ifdef DBUS_UNIX
/* this relies on the systemd activation code path */
g_test_add ("/monitor/activation", Fixture, &fake_systemd_config,
setup, test_activation, teardown);
#endif
return g_test_run ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment