Sort exactness errors.
This commit is contained in:
parent
4b8326ad60
commit
7f40296382
|
@ -8,6 +8,21 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
static int
|
||||||
|
_errors_sort_cb(List_Entry *a, List_Entry *b)
|
||||||
|
{
|
||||||
|
return strcmp(a->name, b->name);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_exactness_errors_sort(Exactness_Ctx *ctx)
|
||||||
|
{
|
||||||
|
ctx->errors =
|
||||||
|
eina_list_sort(ctx->errors, 0, (Eina_Compare_Cb) _errors_sort_cb);
|
||||||
|
ctx->compare_errors =
|
||||||
|
eina_list_sort(ctx->compare_errors, 0, (Eina_Compare_Cb) strcmp);
|
||||||
|
}
|
||||||
|
|
||||||
static const Ecore_Getopt optdesc = {
|
static const Ecore_Getopt optdesc = {
|
||||||
"exactness",
|
"exactness",
|
||||||
"%prog [options] <-r|-p|-i|-s> <list file>",
|
"%prog [options] <-r|-p|-i|-s> <list file>",
|
||||||
|
@ -171,6 +186,9 @@ main(int argc, char *argv[])
|
||||||
exactness_ctx.tests_executed,
|
exactness_ctx.tests_executed,
|
||||||
eina_inlist_count(EINA_INLIST_GET(test_list)));
|
eina_inlist_count(EINA_INLIST_GET(test_list)));
|
||||||
|
|
||||||
|
/* Sort the errors and the compare_errors. */
|
||||||
|
_exactness_errors_sort(&exactness_ctx);
|
||||||
|
|
||||||
if (exactness_ctx.errors || exactness_ctx.compare_errors)
|
if (exactness_ctx.errors || exactness_ctx.compare_errors)
|
||||||
{
|
{
|
||||||
FILE *report_file;
|
FILE *report_file;
|
||||||
|
|
Loading…
Reference in New Issue