[gnome-desktop-testing] runner: Print all tests which failed at the end if on a tty
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop-testing] runner: Print all tests which failed at the end if on a tty
- Date: Thu, 18 Dec 2014 04:13:00 +0000 (UTC)
commit 5fcf8c103480c9842ebd3a25274ee227d1b998a3
Author: Colin Walters <walters verbum org>
Date: Wed Dec 17 23:12:29 2014 -0500
runner: Print all tests which failed at the end if on a tty
So one doesn't have to scroll back and find them.
src/gnome-desktop-testing-runner.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-desktop-testing-runner.c b/src/gnome-desktop-testing-runner.c
index 1e0a58f..503ae92 100755
--- a/src/gnome-desktop-testing-runner.c
+++ b/src/gnome-desktop-testing-runner.c
@@ -47,6 +47,7 @@ typedef struct {
GCancellable *cancellable;
GPtrArray *tests;
+ GPtrArray *failed_test_msgs;
int parallel;
int test_index;
@@ -300,6 +301,7 @@ log_test_completion (Test *test,
{
msgid_value = ONE_TEST_FAILED_MSGID;
msg = g_strconcat ("FAILED: ", test->name, " (", reason, ")", NULL);
+ g_ptr_array_add (app->failed_test_msgs, g_strdup (msg));
}
else if (test->state == TEST_STATE_COMPLETE_SKIPPED)
{
@@ -690,6 +692,7 @@ main (int argc, char **argv)
app->pending_tests = g_hash_table_new (NULL, NULL);
app->tests = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref);
+ app->failed_test_msgs = g_ptr_array_new_with_free_func ((GDestroyNotify)g_free);
if (opt_dirs)
datadirs_iter = (const char *const*) opt_dirs;
@@ -829,6 +832,11 @@ main (int argc, char **argv)
ret ? "" : " (incomplete)",
total_tests, n_passed, n_skipped, n_failed,
rusage_str != NULL ? rusage_str : "");
+ if (gs_console_get ())
+ {
+ for (i = 0; i < app->failed_test_msgs->len; i++)
+ g_print ("%s\n", app->failed_test_msgs->pdata[i]);
+ }
}
g_clear_pointer (&app->pending_tests, g_hash_table_unref);
g_clear_pointer (&app->tests, g_ptr_array_unref);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]