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/test/test-unit-name.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/test/test-unit-name.c') diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index 0b6b56394e..aba36e4df1 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -108,7 +108,7 @@ static void test_replacements(void) { #undef expect } -static void test_unit_printf(void) { +static int test_unit_printf(void) { Manager *m; Unit *u, *u2; int r; @@ -126,7 +126,7 @@ static void test_unit_printf(void) { r = manager_new(SYSTEMD_USER, &m); if (r == -EPERM) { puts("manager_new: Permission denied. Skipping test."); - return; + return EXIT_TEST_SKIP; } assert(r == 0); @@ -189,11 +189,11 @@ static void test_unit_printf(void) { expect(u2, "%b", bid); expect(u2, "%H", host); expect(u2, "%t", "/run/user/*"); + + return 0; } int main(int argc, char* argv[]) { test_replacements(); - test_unit_printf(); - - return 0; + return test_unit_printf(); } -- cgit v1.2.3-54-g00ecf