Disable activation tests on Windows builds
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 19 Oct 2015 14:18:02 +0000 (15:18 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 22 Oct 2015 16:35:59 +0000 (17:35 +0100)
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>
test/Makefile.am
test/monitor.c

index 6734ab9..5812c1a 100644 (file)
@@ -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 = \
index c099139..7fef934 100644 (file)
@@ -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 ();
 }