diff -r 2c88fd553e5d -r 9fb13a5dde3b test/harness/testcase.c --- a/test/harness/testcase.c Mon Feb 06 23:55:27 2012 +0000 +++ b/test/harness/testcase.c Mon Sep 23 21:18:27 2013 +0100 @@ -469,13 +469,7 @@ g_error_free(error); return FALSE; } - if (testcase->expected || testcase->warnings) - r=testcase_spawn_bookloupe(testcase,&output,&error); - else - { - r=testcase_spawn_bookloupe(testcase,NULL,&error); - output=NULL; - } + r=testcase_spawn_bookloupe(testcase,&output,&error); if (!r) { g_print("%s: FAIL\n",testcase->basename); @@ -492,37 +486,33 @@ g_error_free(error); return FALSE; } - if (testcase->expected || testcase->warnings) + header=g_string_new("\n\nFile: "); + g_string_append(header,filename); + g_string_append(header,"\n"); + if (!g_str_has_prefix(output,header->str)) { - header=g_string_new("\n\nFile: "); - g_string_append(header,filename); - g_string_append(header,"\n"); - if (!g_str_has_prefix(output,header->str)) + g_print("%s: FAIL\n",testcase->basename); + g_print("Unexpected header from bookloupe:\n"); + offset=common_prefix_length(output,header->str); + print_unexpected(output,offset); + r=FALSE; + } + pos=header->len; + if (r) + { + /* Skip the summary */ + s=strstr(output+pos,"\n\n"); + if (s) + pos=s-output+2; + else { g_print("%s: FAIL\n",testcase->basename); - g_print("Unexpected header from bookloupe:\n"); - offset=common_prefix_length(output,header->str); - print_unexpected(output,offset); + g_print("Unterminated summary from bookloupe:\n%s\n",output+pos); r=FALSE; } - pos=header->len; - if (r) - { - /* Skip the summary */ - s=strstr(output+pos,"\n\n"); - if (s) - pos=s-output+2; - else - { - g_print("%s: FAIL\n",testcase->basename); - g_print("Unterminated summary from bookloupe:\n%s\n", - output+pos); - r=FALSE; - } - } - g_string_free(header,TRUE); - r=testcase_check_warnings(testcase,output+pos,&xfail); } + g_string_free(header,TRUE); + r=testcase_check_warnings(testcase,output+pos,&xfail); g_free(filename); g_free(output); if (r)