summaryrefslogtreecommitdiff
path: root/src/test/test-exec-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-13 14:31:13 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-14 09:29:57 +0200
commit6d7c403324091b0ac0797dbd26b9fe61d4aea9a3 (patch)
treec1e977d368f861961955db8624b61729d30943d2 /src/test/test-exec-util.c
parent8b81c382c390d69e48d653c357b4d820bfc149a6 (diff)
downloadsystemd-6d7c403324091b0ac0797dbd26b9fe61d4aea9a3.tar.gz
tests: use a helper function to parse environment and open logging
The advantages are that we save a few lines, and that we can override logging using environment variables in more test executables.
Diffstat (limited to 'src/test/test-exec-util.c')
-rw-r--r--src/test/test-exec-util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/test-exec-util.c b/src/test/test-exec-util.c
index cfc8b5f88e..d346a4d6f7 100644
--- a/src/test/test-exec-util.c
+++ b/src/test/test-exec-util.c
@@ -19,6 +19,7 @@
#include "rm-rf.h"
#include "string-util.h"
#include "strv.h"
+#include "tests.h"
static int here = 0, here2 = 0, here3 = 0;
void *ignore_stdout_args[] = {&here, &here2, &here3};
@@ -334,9 +335,7 @@ static void test_environment_gathering(void) {
}
int main(int argc, char *argv[]) {
- log_set_max_level(LOG_DEBUG);
- log_parse_environment();
- log_open();
+ test_setup_logging(LOG_DEBUG);
test_execute_directory(true);
test_execute_directory(false);