summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/test-bus-chat.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-26 21:07:46 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-26 23:50:44 -0400
commit49e5de64e22ea4794092b91393545ab08e658e0a (patch)
treed3f49aed0bd01890f4a60f773d8fdda412f65d94 /src/libsystemd-bus/test-bus-chat.c
parentf7703533a4d6bac9ba708218a3244cdc60376446 (diff)
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.
Diffstat (limited to 'src/libsystemd-bus/test-bus-chat.c')
-rw-r--r--src/libsystemd-bus/test-bus-chat.c7
1 files changed, 5 insertions, 2 deletions
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...");