core: do not enumerate units in MANAGER_TEST_RUN_MINIMAL mode

In this mode we are not supposed to "interact with the environment", so loading
all units and printing warnings about syntax errors and /var/run usage seems
inappropriate.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-06-26 14:56:59 +02:00
parent bbd199c438
commit b1d5246d29

View file

@ -1378,6 +1378,9 @@ static void manager_enumerate_perpetual(Manager *m) {
assert(m);
if (m->test_run_flags == MANAGER_TEST_RUN_MINIMAL)
return;
/* Let's ask every type to load all units from disk/kernel that it might know */
for (c = 0; c < _UNIT_TYPE_MAX; c++) {
if (!unit_type_supported(c)) {
@ -1395,6 +1398,9 @@ static void manager_enumerate(Manager *m) {
assert(m);
if (m->test_run_flags == MANAGER_TEST_RUN_MINIMAL)
return;
/* Let's ask every type to load all units from disk/kernel that it might know */
for (c = 0; c < _UNIT_TYPE_MAX; c++) {
if (!unit_type_supported(c)) {