J'ai toujours des problème chez moi avec le test
olena/tests/io/tests/2d : il sort avec un exit status de 1.
Apparemment, les faits suivants :
1. srcdir != builddir ; et
2. utilisation de la Zlib
ne sont pas étrangers à ce problème.
Pourriez-vous essayer de reproduire ça chez vous ? Il suffit de lancer
le test sur une copie de travail où le build n'est pas fait dans le
répertoire des sources :
cd my/working/copy/of/olena
./bootstrap.sh # Si c'est une copie neuve récupérée depuis le dépôt
mkdir _build
cd _build
../configure
make
make olena/tests/check check
make olena/tests/io check
(et vérifier que la Zlib est bien installée sur votre système, mais
c'est sans doute le cas).
Merci !
https://svn.lrde.epita.fr/svn/oln/prototypes/proto-1.0/olena
ChangeLog | 9 +++++++++
tests/check/Makefile.flags | 4 ++--
tests/io/loadsave.hh | 8 ++++----
3 files changed, 15 insertions(+), 6 deletions(-)
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Enforce tests on oln::io.
* tests/io/loadsave.hh (compare): Check whether images have data.
* tests/io/tests/2d: Aesthetic changes.
* tests/check/Makefile.flags (AM_CPPFLAGS): Look in
olena/tests/check before metalic/tests/check.
Index: tests/io/loadsave.hh
--- tests/io/loadsave.hh (revision 203)
+++ tests/io/loadsave.hh (working copy)
@@ -13,13 +13,13 @@
bool compare(const oln::abstract::image<E>& a,
const oln::abstract::image<E>& b)
{
-
- oln_type_of(E, fwd_piter) it(a.size());
-
- if (a.size().nrows() != b.size().nrows() ||
+ if (!a.exact().has_data() or !b.exact().has_data())
+ return false;
+ if (a.size().nrows() != b.size().nrows() or
a.size().ncols() != b.size().ncols())
return false;
+ oln_type_of(E, fwd_piter) it(a.size());
for_all_p(it)
{
if (a[it] != b[it])
Index: tests/check/Makefile.flags
--- tests/check/Makefile.flags (revision 203)
+++ tests/check/Makefile.flags (working copy)
@@ -4,6 +4,6 @@
$(CXXFLAGS_DEBUG) \
$(CXXFLAGS_STRICT_ERRORS) $(ZLIB_CXXFLAGS)
AM_CPPFLAGS = \
- -I$(top_srcdir)/metalic/tests/check \
- -I$(top_srcdir)/olena/tests/check
+ -I$(top_srcdir)/olena/tests/check \
+ -I$(top_srcdir)/metalic/tests/check
AM_LDFLAGS =
Index: tests/io/tests/2d
--- tests/io/tests/2d (revision 203)
+++ tests/io/tests/2d (working copy)
@@ -42,22 +42,22 @@
typedef oln::image2d<unsigned char> ima_uchar;
typedef oln::image2d<signed char> ima_schar;
- fail |= loadsave< ima_int_u8 >(rdata("16x16.pgm"),
"16x16.pgm");
- fail |= loadsave< ima_bin >(rdata("16x16.pbm"),
"16x16.pbm");
- fail |= loadsave< ima_rgb_8 >(rdata("16x16.ppm"),
"16x16.ppm");
- fail |= loadsave< ima_int_s8 >(rdata("16x16.pgm"),
"16x16.pgm");
- fail |= loadsave< ima_bool >(rdata("16x16.pbm"),
"16x16.pbm");
- fail |= loadsave< ima_uchar >(rdata("16x16.pgm"),
"16x16.pgm");
- fail |= loadsave< ima_schar >(rdata("16x16.pgm"),
"16x16.pgm");
+ fail |= loadsave< ima_int_u8 >(rdata("16x16.pgm"),
"16x16.pgm");
+ fail |= loadsave< ima_bin >(rdata("16x16.pbm"),
"16x16.pbm");
+ fail |= loadsave< ima_rgb_8 >(rdata("16x16.ppm"),
"16x16.ppm");
+ fail |= loadsave< ima_int_s8 >(rdata("16x16.pgm"),
"16x16.pgm");
+ fail |= loadsave< ima_bool >(rdata("16x16.pbm"),
"16x16.pbm");
+ fail |= loadsave< ima_uchar >(rdata("16x16.pgm"),
"16x16.pgm");
+ fail |= loadsave< ima_schar >(rdata("16x16.pgm"),
"16x16.pgm");
#if HAVE_ZLIB
- fail |= loadsave< ima_bin >(rdata("16x16.pbm.gz"),
"16x16.pbm.gz");
- fail |= loadsave< ima_int_u8 >(rdata("16x16.pgm.gz"),
"16x16.pgm.gz");
- fail |= loadsave< ima_rgb_8 >(rdata("16x16.ppm.gz"),
"16x16.ppm.gz");
- fail |= loadsave< ima_int_s8 >(rdata("16x16.pgm.gz"),
"16x16.pgm.gz");
- fail |= loadsave< ima_bool >(rdata("16x16.pbm.gz"),
"16x16.pbm.gz");
- fail |= loadsave< ima_uchar >(rdata("16x16.pgm.gz"),
"16x16.pgm.gz");
- fail |= loadsave< ima_schar >(rdata("16x16.pgm.gz"),
"16x16.pgm.gz");
+ fail |= loadsave< ima_bin >(rdata("16x16.pbm.gz"),
"16x16.pbm.gz");
+ fail |= loadsave< ima_int_u8 >(rdata("16x16.pgm.gz"),
"16x16.pgm.gz");
+ fail |= loadsave< ima_rgb_8 >(rdata("16x16.ppm.gz"),
"16x16.ppm.gz");
+ fail |= loadsave< ima_int_s8 >(rdata("16x16.pgm.gz"),
"16x16.pgm.gz");
+ fail |= loadsave< ima_bool >(rdata("16x16.pbm.gz"),
"16x16.pbm.gz");
+ fail |= loadsave< ima_uchar >(rdata("16x16.pgm.gz"),
"16x16.pgm.gz");
+ fail |= loadsave< ima_schar >(rdata("16x16.pgm.gz"),
"16x16.pgm.gz");
#endif
return fail;