diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-01-07 08:41:24 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-20 19:48:16 -0400 |
commit | 0d8c31ff7237149b505290652864b4e7e866b2a7 (patch) | |
tree | 2a1497d3b0384fb7ab20c6010276be0e166619eb /src/core/main.c | |
parent | f0ea29eaeb3449822bfbdfa839b00e323dfc523e (diff) |
test-engine: fix access to unit load path
Also add a bit of debugging output to help diagnose problems,
add missing units, and simplify cppflags.
Move test-engine to normal tests from manual tests, it should now
work without destroying the system.
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; |