diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-13 14:31:13 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-09-14 09:29:57 +0200 |
commit | 6d7c403324091b0ac0797dbd26b9fe61d4aea9a3 (patch) | |
tree | c1e977d368f861961955db8624b61729d30943d2 /src/timesync | |
parent | 8b81c382c390d69e48d653c357b4d820bfc149a6 (diff) | |
download | systemd-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/timesync')
-rw-r--r-- | src/timesync/test-timesync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timesync/test-timesync.c b/src/timesync/test-timesync.c index a045eeeec1..bd03a1dd90 100644 --- a/src/timesync/test-timesync.c +++ b/src/timesync/test-timesync.c @@ -5,6 +5,7 @@ #include "log.h" #include "macro.h" #include "timesyncd-conf.h" +#include "tests.h" static void test_manager_parse_string(void) { /* Make sure that NTP_SERVERS is configured to something @@ -25,8 +26,7 @@ static void test_manager_parse_string(void) { } int main(int argc, char **argv) { - log_set_max_level(LOG_DEBUG); - log_parse_environment(); + test_setup_logging(LOG_DEBUG); test_manager_parse_string(); |