[gnome-desktop-testing] Use latest libgsystem printing API
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop-testing] Use latest libgsystem printing API
- Date: Mon, 20 May 2013 21:19:14 +0000 (UTC)
commit 930f0984ad28f172bd06891deecbe8ff54ddc788
Author: Colin Walters <walters verbum org>
Date: Mon May 20 17:18:58 2013 -0400
Use latest libgsystem printing API
Less ugly code.
src/gnome-desktop-testing-runner.c | 21 ++++++++-------------
src/libgsystem | 2 +-
2 files changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/src/gnome-desktop-testing-runner.c b/src/gnome-desktop-testing-runner.c
index 1f41742..58d1581 100755
--- a/src/gnome-desktop-testing-runner.c
+++ b/src/gnome-desktop-testing-runner.c
@@ -161,25 +161,21 @@ run_test (GFile *testbase,
{
if (g_error_matches (tmp_error, G_SPAWN_EXIT_ERROR, 77))
{
- char *keys[] = { "MESSAGE_ID=" ONE_TEST_SKIPPED_MSGID, NULL };
- gs_free char *msg = g_strdup_printf ("Test %s skipped (exit code 77)", testname);
- gs_log_structured_print (msg, (const char* const*)keys);
+ gs_log_structured_print_id_v (ONE_TEST_SKIPPED_MSGID,
+ "Test %s skipped (exit code 77)", testname);
n_skipped_tests++;
}
else
{
- char *keys[] = { "MESSAGE_ID=" ONE_TEST_FAILED_MSGID, NULL };
- gs_free char *msg = g_strdup_printf ("Test %s failed: %s", testname, tmp_error->message);
- gs_log_structured_print (msg, (const char* const*)keys);
+ gs_log_structured_print_id_v (ONE_TEST_FAILED_MSGID,
+ "Test %s failed: %s", testname, tmp_error->message);
n_failed_tests++;
}
g_clear_error (&tmp_error);
}
else
{
- char *keys[] = { "MESSAGE_ID=" ONE_TEST_SUCCESS_MSGID, NULL };
- gs_free char *msg = g_strdup_printf ("PASS: %s", testname);
- gs_log_structured_print (msg, (const char* const*)keys);
+ gs_log_structured_print_id_v (ONE_TEST_SUCCESS_MSGID, "PASS: %s", testname);
ntests += 1;
}
@@ -274,10 +270,9 @@ main (int argc, char **argv)
out:
if (!opt_list)
{
- char *keys[] = { "MESSAGE_ID=" TESTS_COMPLETE_MSGID, NULL };
- gs_free char *msg = g_strdup_printf ("SUMMARY: total: %u passed: %d skipped: %d failed: %d",
- tests->len, ntests, n_skipped_tests, n_failed_tests);
- gs_log_structured_print (msg, (const char *const*)keys);
+ gs_log_structured_print_id_v (TESTS_COMPLETE_MSGID,
+ "SUMMARY: total: %u passed: %d skipped: %d failed: %d",
+ tests->len, ntests, n_skipped_tests, n_failed_tests);
}
if (!ret)
{
diff --git a/src/libgsystem b/src/libgsystem
index b2a65b2..52f38c8 160000
--- a/src/libgsystem
+++ b/src/libgsystem
@@ -1 +1 @@
-Subproject commit b2a65b235600e340fada441de7e131de9d52d25e
+Subproject commit 52f38c8d9bf9f4ba1ac3dea4fd1a5c89a7362191
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]