From 49e5de64e22ea4794092b91393545ab08e658e0a Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Tue, 26 Mar 2013 21:07:46 -0400 Subject: tests: skip bus test if bus cannot be opened To make the result more visible, special return value is used to tell automake that the test was skipped. While at it, use the same return value in other skipped tests. --- src/libsystemd-bus/test-bus-chat.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/libsystemd-bus') diff --git a/src/libsystemd-bus/test-bus-chat.c b/src/libsystemd-bus/test-bus-chat.c index bdcca18c84..e124b247d1 100644 --- a/src/libsystemd-bus/test-bus-chat.c +++ b/src/libsystemd-bus/test-bus-chat.c @@ -27,6 +27,7 @@ #include "log.h" #include "util.h" +#include "macro.h" #include "sd-bus.h" #include "bus-message.h" @@ -543,8 +544,10 @@ int main(int argc, char *argv[]) { int q, r; r = server_init(&bus); - if (r < 0) - return EXIT_FAILURE; + if (r < 0) { + log_info("Failed to connect to bus, skipping tests."); + return EXIT_TEST_SKIP; + } log_info("Initialized..."); -- cgit v1.2.3-54-g00ecf