[PATCH] osmo-iuh[master]: tests: don't log filename nor color in unit tests

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Aug 29 15:00:57 UTC 2016


Review at  https://gerrit.osmocom.org/779

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
---
M src/tests/test-helpers.err
M src/tests/test_common.c
2 files changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/79/779/1

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 @@
 		exit(1);
 
 	ranap_set_log_area(DRANAP);
+
+	log_set_print_filename(osmo_stderr_target, 0);
+	log_set_use_color(osmo_stderr_target, 0);
 }

-- 
To view, visit https://gerrit.osmocom.org/779
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie76384c4176ce0a7d89d093f2efb848fe3f19400
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list