Suite: fix exu files comparison

To compare two exu files during the test suite, we need to unpack
the images in directories and make the comparison from there.
The problem is that the "orig" exu file was unpacked in the current
directory as well, leading to compare an image with itself.

The fix consists in unpacking the right exu file.
master
Daniel Zaoui 4 years ago
parent 9831560caf
commit 3f31c8f72e
  1. 8
      src/bin/exactness.c

@ -170,12 +170,14 @@ _run_test_compare(const List_Entry *ent)
sprintf(path, "%s/%s.exu", base_dir, ent->name);
if (ecore_file_exists(path))
{
char *currentdir = alloca(strlen(_dest_dir) + 20);
sprintf(currentdir, "%s/%s", _dest_dir, CURRENT_SUBDIR);
_exu_imgs_unpack(path, currentdir, ent->name);
char *currentdir;
sprintf(origdir, "%s/%s/%s", _dest_dir, CURRENT_SUBDIR, ORIG_SUBDIR);
mkdir(origdir, 0744);
_exu_imgs_unpack(path, origdir, ent->name);
sprintf(path, "%s/%s/%s.exu", _dest_dir, CURRENT_SUBDIR, ent->name);
currentdir = alloca(strlen(_dest_dir) + 20);
sprintf(currentdir, "%s/%s", _dest_dir, CURRENT_SUBDIR);
_exu_imgs_unpack(path, currentdir, ent->name);
goto found;
}
else

Loading…
Cancel
Save