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/journal/test-journal-interleaving.c | |
parent | meson: drop some unneeded parens (diff) | |
download | systemd-317bb217d3f21312e58d9efdc6d3739f7895a08c.tar.xz systemd-317bb217d3f21312e58d9efdc6d3739f7895a08c.zip |
tests: add helper to unify skipping a test and exiting
Diffstat (limited to 'src/journal/test-journal-interleaving.c')
-rw-r--r-- | src/journal/test-journal-interleaving.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c index a227dec646..82da68e0ea 100644 --- a/src/journal/test-journal-interleaving.c +++ b/src/journal/test-journal-interleaving.c @@ -15,9 +15,9 @@ #include "parse-util.h" #include "rm-rf.h" #include "util.h" +#include "tests.h" -/* This program tests skipping around in a multi-file journal. - */ +/* This program tests skipping around in a multi-file journal. */ static bool arg_keep = false; @@ -277,10 +277,8 @@ int main(int argc, char *argv[]) { log_set_max_level(LOG_DEBUG); /* journal_file_open requires a valid machine id */ - if (access("/etc/machine-id", F_OK) != 0) { - log_info("/etc/machine-id not found, skipping tests."); - return EXIT_TEST_SKIP; - } + if (access("/etc/machine-id", F_OK) != 0) + return log_tests_skipped("/etc/machine-id not found"); arg_keep = argc > 1; |