diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-13 13:34:12 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-14 09:29:57 +0200 |
commit | 317bb217d3f21312e58d9efdc6d3739f7895a08c (patch) | |
tree | 3915b40c31898e4b3b3e80406b9e53aa64446ac9 /src/shared/tests.c | |
parent | c1cd674357f921136b1e74ece641288670de33c7 (diff) | |
download | systemd-317bb217d3f21312e58d9efdc6d3739f7895a08c.tar.gz |
tests: add helper to unify skipping a test and exiting
Diffstat (limited to 'src/shared/tests.c')
-rw-r--r-- | src/shared/tests.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shared/tests.c b/src/shared/tests.c index cb5b7b6dea..884f34bc72 100644 --- a/src/shared/tests.c +++ b/src/shared/tests.c @@ -9,6 +9,7 @@ #include "alloc-util.h" #include "env-util.h" #include "fileio.h" +#include "log.h" #include "path-util.h" #include "strv.h" #include "tests.h" @@ -89,3 +90,9 @@ bool slow_tests_enabled(void) { log_warning_errno(r, "Cannot parse $SYSTEMD_SLOW_TESTS, ignoring."); return SYSTEMD_SLOW_TESTS_DEFAULT; } + +int log_tests_skipped(const char *message) { + log_notice("%s: %s, skipping tests.", + program_invocation_short_name, message); + return EXIT_TEST_SKIP; +} |