core/manager: when running in test mode, use a temp dir for generated stuff
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Sep 2017 17:26:29 +0000 (19:26 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Sep 2017 17:41:24 +0000 (19:41 +0200)
commita1f31f47152f30e2b6576efaf0027e4cb039c176
treeccf595c28fe8f824bfd442065b86b958fd0716da
parent81fe6cdee2a9f029259aba48ea590614d7678abf
core/manager: when running in test mode, use a temp dir for generated stuff

When running through systemd-analyze verify or with --test, we would
not run generators (environment or unit). But at the end, we would nuke
the generator dirs anyway.

Simplify things by actually running generators of both types, but redirecting
their output to a temporary directory. This has the advantage that we test more
code, and the verification is more complete.

Since now we are not touching the real generator directories, we also don't
delete them, which fixes #5609.
src/core/manager.c
src/shared/path-lookup.c
src/shared/path-lookup.h