diff options
author | Sam Thursfield <sam@afuera.me.uk> | 2020-01-23 23:36:17 +0100 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2020-01-23 23:39:52 +0100 |
commit | 2c4b1ff5ad1359302e09d2e4abc866cf09067560 (patch) | |
tree | 5f966d783ec226e406f8cdc67168ce8b09740c6e /tests/functional-tests | |
parent | 85bdca2ae1d9de3e136a357cb475100a588fa535 (diff) | |
download | tracker-2c4b1ff5ad1359302e09d2e4abc866cf09067560.tar.gz |
tests: Hide INFO and DEBUG messages by default
Tracker's DEBUG and INFO messages are very verbose -- thousands of lines
each time you open a TrackerSparqlConnection, which some tests do many
times. Let's hide the output by default, guarded behind the
TRACKER_TESTS_VERBOSE environment variable which the functional-tests
are already using.
The size of the meson-logs.txt file reduces from 27MB to about 100KB
with this change.
Any really useful debug messages which are being lost after this change
could be promoted to g_message() to ensure they are always logged.
Diffstat (limited to 'tests/functional-tests')
-rw-r--r-- | tests/functional-tests/ipc/test-bus-query-cancellation.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/functional-tests/ipc/test-bus-query-cancellation.c b/tests/functional-tests/ipc/test-bus-query-cancellation.c index e53ea7134..916b37481 100644 --- a/tests/functional-tests/ipc/test-bus-query-cancellation.c +++ b/tests/functional-tests/ipc/test-bus-query-cancellation.c @@ -112,6 +112,14 @@ main (gint argc, gchar **argv) g_test_init (&argc, &argv, NULL); + /* g_test_init() enables verbose logging by default, but Tracker is too + * verbose. To make the logs managable, we hide DEBUG and INFO messages + * unless TRACKER_TESTS_VERBOSE is set. + */ + if (! g_getenv ("TRACKER_TESTS_VERBOSE")) { + g_log_set_handler ("Tracker", G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO, g_log_default_handler, NULL); + } + g_test_add_func ("/libtracker-sparql/tracker/gb737023", test_tracker_sparql_gb737023); |