From 1744e23547343bcbe9a1941c523efd451cad8f12 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 20 Apr 2015 11:13:44 +0200 Subject: [PATCH 1/3] tests: Add new TpLogger logs that don't parse as XML This is meant to flex the error handling code paths. https://bugs.freedesktop.org/show_bug.cgi?id=89595 --- tests/dbus/test-log-manager.c | 2 +- tests/dbus/test-tpl-log-store-xml.c | 2 +- .../user6@collabora.co.uk/20140101.log | 6 ++++++ .../user6@collabora.co.uk/20140102.log | 5 +++++ .../user6@collabora.co.uk/20140103.log | 5 +++++ 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140101.log create mode 100644 tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140102.log create mode 100644 tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140103.log diff --git a/tests/dbus/test-log-manager.c b/tests/dbus/test-log-manager.c index 3137931..f4f5d29 100644 --- a/tests/dbus/test-log-manager.c +++ b/tests/dbus/test-log-manager.c @@ -457,7 +457,7 @@ test_get_entities (TestCaseFixture *fixture, get_entities_cb, fixture); g_main_loop_run (fixture->main_loop); - g_assert_cmpint (g_list_length (fixture->ret), ==, 5); + g_assert_cmpint (g_list_length (fixture->ret), ==, 6); /* we do not want duplicates */ fixture->ret = g_list_sort (fixture->ret, (GCompareFunc) _tpl_entity_compare); diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c index 35e3178..b9693a6 100644 --- a/tests/dbus/test-tpl-log-store-xml.c +++ b/tests/dbus/test-tpl-log-store-xml.c @@ -119,7 +119,7 @@ test_clear (XmlTestCaseFixture *fixture, TPL_EVENT_MASK_TEXT); g_assert (hits != NULL); - g_assert_cmpint (g_list_length (hits), ==, 4); + g_assert_cmpint (g_list_length (hits), ==, 5); tpl_log_manager_search_free (hits); diff --git a/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140101.log b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140101.log new file mode 100644 index 0000000..26a149c --- /dev/null +++ b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140101.log @@ -0,0 +1,6 @@ + + + +1 +2 + diff --git a/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140102.log b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140102.log new file mode 100644 index 0000000..b909a5e --- /dev/null +++ b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140102.log @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140103.log b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140103.log new file mode 100644 index 0000000..500976f --- /dev/null +++ b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6@collabora.co.uk/20140103.log @@ -0,0 +1,5 @@ + + + +4 + -- 2.1.0