aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-08-26 14:08:51 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-08-29 15:56:20 +0200
commitfc28481a01dc57c60a6c2bae5eb37cb4c5887cf6 (patch)
tree78c53cdac2311db2be814ea315318c58c06e54e0
parent999503c612c96368a6d69b4816483aa14ef20b40 (diff)
tests: don't log filename nor color in unit tests
In experr, we had line numbers in log output, which might change. Also, for make distcheck, the path of the source file might have some '../../' added in the log output (to indicate the src dir as seen from the build dir). Fix both by dropping source file and line. Also drop color while at it. Change-Id: Ie76384c4176ce0a7d89d093f2efb848fe3f19400
-rw-r--r--src/tests/test-helpers.err5
-rw-r--r--src/tests/test_common.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/tests/test-helpers.err b/src/tests/test-helpers.err
index 81b79e1..891094a 100644
--- a/src/tests/test-helpers.err
+++ b/src/tests/test-helpers.err
@@ -1,3 +1,2 @@
-<0004> ranap_common.c:508 Invalid PLMN Identity size: should be 3, is 2
-<0004> ranap_common.c:522 Invalid LAC size: should be 2, is 1
- \ No newline at end of file
+Invalid PLMN Identity size: should be 3, is 2
+Invalid LAC size: should be 2, is 1
diff --git a/src/tests/test_common.c b/src/tests/test_common.c
index 4e4c10c..a79d5f5 100644
--- a/src/tests/test_common.c
+++ b/src/tests/test_common.c
@@ -85,4 +85,7 @@ int test_common_init(void)
exit(1);
ranap_set_log_area(DRANAP);
+
+ log_set_print_filename(osmo_stderr_target, 0);
+ log_set_use_color(osmo_stderr_target, 0);
}