diff -r 9fb13a5dde3b -r 8c2d6a0cf717 test/harness/testcase.c --- a/test/harness/testcase.c Mon Sep 23 21:18:27 2013 +0100 +++ b/test/harness/testcase.c Tue Sep 24 07:18:50 2013 +0100 @@ -527,6 +527,31 @@ } /* + * Run a testcase, returning FALSE on error. + * Bookloupe's output or a suitable error message will be shown. + */ +gboolean testcase_show_output(Testcase *testcase) +{ + gboolean r; + gchar *output; + GError *error=NULL; + r=testcase_create_input_files(testcase,&error); + if (r) + { + r&=testcase_spawn_bookloupe(testcase,&output,&error); + r&=testcase_remove_input_files(testcase,&error); + } + if (r) + g_print("%s",output); + else + { + g_print("%s\n",error->message); + g_error_free(error); + } + return r; +} + +/* * Free a testcase warning. */ void testcase_warning_free(TestcaseWarning *warning)