chiark / gitweb /
test: Make testing work on systems without or old systemd
[elogind.git] / src / journal / test-journal.c
index 534fd28fa69a54e5c3472512667069af74a773a8..190c426ebad52dc4916dd3809401607ba0e57978 100644 (file)
@@ -174,6 +174,10 @@ static void test_empty(void) {
 int main(int argc, char *argv[]) {
         arg_keep = argc > 1;
 
+        /* journal_file_open requires a valid machine id */
+        if (access("/etc/machine-id", F_OK) != 0)
+                return EXIT_TEST_SKIP;
+
         test_non_empty();
         test_empty();