diff --git a/src/bin/exactness.c b/src/bin/exactness.c index 15b1e15..9af42df 100644 --- a/src/bin/exactness.c +++ b/src/bin/exactness.c @@ -168,27 +168,54 @@ main(int argc, char *argv[]) exactness_ctx.tests_executed, eina_inlist_count(EINA_INLIST_GET(test_list))); - if (exactness_ctx.errors) + if (exactness_ctx.errors || exactness_ctx.compare_errors) { - Eina_List *itr; - List_Entry *ent; - printf("List of tests that failed execution:\n"); - EINA_LIST_FOREACH(exactness_ctx.errors, itr, ent) - { - printf("\t* %s\n", ent->name); - } - ret = 1; - } + FILE *report_file; + char report_filename[EXACTNESS_PATH_MAX] = ""; + /* Generate the filename. */ + snprintf(report_filename, EXACTNESS_PATH_MAX, + "%s/%s/errors.html", + exactness_config.dest_dir, CURRENT_SUBDIR); + report_file = fopen(report_filename, "w+"); + printf("%s %p\n", report_filename, report_file); + fprintf(report_file, + "Exactness report"); - if (exactness_ctx.compare_errors) - { - char *test_name; - printf("List of images that failed comparison:\n"); - EINA_LIST_FREE(exactness_ctx.compare_errors, test_name) + if (exactness_ctx.errors) { - printf("\t* %s\n", test_name); - free(test_name); + fprintf(report_file, + "

Tests that failed execution:


"); } + + if (exactness_ctx.compare_errors) + { + fprintf(report_file, + "

Images that failed comparison: (Original, Current, Diff)


"); + } + fprintf(report_file, + ""); + + printf("Report html: %s\n", report_filename); ret = 1; }