From 8348abb372104edd748cd4a44d89050b6854b5eb Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 25 Oct 2017 12:14:13 +0200 Subject: [PATCH] client: fix stderror logging in unit-test When testing the file name and the line numbers are output to stderr, this causes the test to fail when change moves the lines. Disable line numbers in the stderror log when testing, also disable timestamps and colors. Make sure the log category is print. Change-Id: I7f1bd9454188f0ca869dada1fcc2877b789cc0ac --- tests/mgcp_client/mgcp_client_test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index f2f0e0ff5..69e18104a 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -163,6 +163,10 @@ int main(int argc, char **argv) ctx = talloc_named_const(NULL, 1, "mgcp_client_test"); msgb_talloc_ctx_init(ctx, 0); osmo_init_logging(&log_info); + log_set_print_filename(osmo_stderr_target, 0); + log_set_print_timestamp(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); mgcp_client_conf_init(&conf);