diff options
Diffstat (limited to 'src/core/main.c')
-rw-r--r-- | src/core/main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/main.c b/src/core/main.c index ae38b435d9..29f97364a4 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1473,6 +1473,9 @@ int main(int argc, char *argv[]) { goto finish; } + if (arg_action == ACTION_TEST) + skip_setup = true; + pager_open_if_enabled(); if (arg_action == ACTION_HELP) { @@ -1543,7 +1546,8 @@ int main(int argc, char *argv[]) { if (arg_running_as == SYSTEMD_SYSTEM) { const char *virtualization = NULL; - log_info(PACKAGE_STRING " running in system mode. (" SYSTEMD_FEATURES ")"); + log_info(PACKAGE_STRING " running in %ssystem mode. (" SYSTEMD_FEATURES ")", + arg_action == ACTION_TEST ? "test " : "" ); detect_virtualization(&virtualization); if (virtualization) @@ -1571,7 +1575,8 @@ int main(int argc, char *argv[]) { _cleanup_free_ char *t; t = uid_to_name(getuid()); - log_debug(PACKAGE_STRING " running in user mode for user "UID_FMT"/%s. (" SYSTEMD_FEATURES ")", getuid(), strna(t)); + log_debug(PACKAGE_STRING " running in %suser mode for user "UID_FMT"/%s. (" SYSTEMD_FEATURES ")", + arg_action == ACTION_TEST ? " test" : "", getuid(), t); } if (arg_running_as == SYSTEMD_SYSTEM && !skip_setup) { @@ -1636,7 +1641,7 @@ int main(int argc, char *argv[]) { } } - r = manager_new(arg_running_as, &m); + r = manager_new(arg_running_as, arg_action == ACTION_TEST, &m); if (r < 0) { log_error("Failed to allocate manager object: %s", strerror(-r)); goto finish; |