diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-10-19 15:18:02 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-10-22 17:35:59 +0100 |
commit | 382cb17d37e9098b2dcec6bc20b92467b63a7ae3 (patch) | |
tree | f3510f765c9cbac2c8d696846d486e73d886a57e | |
parent | 12214344a281f2905349990248b5001660567a1d (diff) | |
download | dbus-382cb17d37e9098b2dcec6bc20b92467b63a7ae3.tar.gz |
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=92538
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
-rw-r--r-- | test/Makefile.am | 10 | ||||
-rw-r--r-- | test/monitor.c | 11 |
2 files changed, 20 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 6734ab99..5812c1a9 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -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 = \ diff --git a/test/monitor.c b/test/monitor.c index c099139a..7fef934c 100644 --- a/test/monitor.c +++ b/test/monitor.c @@ -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 (); } |