diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/tests.c | 7 | ||||
-rw-r--r-- | src/shared/tests.h | 1 |
2 files changed, 8 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; +} diff --git a/src/shared/tests.h b/src/shared/tests.h index 44b52f5589..67d5e1ce4a 100644 --- a/src/shared/tests.h +++ b/src/shared/tests.h @@ -5,3 +5,4 @@ char* setup_fake_runtime_dir(void); const char* get_testdata_dir(void); const char* get_catalog_dir(void); bool slow_tests_enabled(void); +int log_tests_skipped(const char *message); |