commit
185295f247
|
@ -6,3 +6,5 @@ ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
include_HEADERS = include/gf_complete.h include/gf_method.h include/gf_rand.h include/gf_general.h
|
include_HEADERS = include/gf_complete.h include/gf_method.h include/gf_rand.h include/gf_general.h
|
||||||
|
|
||||||
|
# display the output of failed TESTS after a failed make check
|
||||||
|
export VERBOSE = true
|
||||||
|
|
|
@ -60,5 +60,11 @@ AC_ARG_ENABLE([sse],
|
||||||
fi]
|
fi]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([valgrind],
|
||||||
|
[AS_HELP_STRING([--enable-valgrind], [run tests with valgrind])],
|
||||||
|
[],
|
||||||
|
[enable_valgrind=no])
|
||||||
|
AM_CONDITIONAL(ENABLE_VALGRIND, test "x$enable_valgrind" != xno)
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile src/Makefile tools/Makefile test/Makefile examples/Makefile])
|
AC_CONFIG_FILES([Makefile src/Makefile tools/Makefile test/Makefile examples/Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
3
src/gf.c
3
src/gf.c
|
@ -910,7 +910,8 @@ void gf_multby_one(void *src, void *dest, int bytes, int xor)
|
||||||
gf_region_data rd;
|
gf_region_data rd;
|
||||||
|
|
||||||
if (!xor) {
|
if (!xor) {
|
||||||
memcpy(dest, src, bytes);
|
if (dest != src)
|
||||||
|
memcpy(dest, src, bytes);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uls = (unsigned long) src;
|
uls = (unsigned long) src;
|
||||||
|
|
|
@ -33,9 +33,14 @@ gf_inline_time_SOURCES = gf_inline_time.c
|
||||||
#gf_inline_time_LDFLAGS = -lgf_complete
|
#gf_inline_time_LDFLAGS = -lgf_complete
|
||||||
gf_inline_time_LDADD = ../src/libgf_complete.la
|
gf_inline_time_LDADD = ../src/libgf_complete.la
|
||||||
|
|
||||||
|
# gf_unit 8 A -1 -m LOG_ZERO_EXT is excluded until http://lab.jerasure.org/jerasure/gf-complete/issues/13 is resolved
|
||||||
|
if ENABLE_VALGRIND
|
||||||
|
VALGRIND = | perl -p -e 's|^|../libtool --mode=execute valgrind --quiet --error-exitcode=1 --tool=memcheck | if(!/gf_unit 8 A -1 -m LOG_ZERO_EXT/)'
|
||||||
|
endif
|
||||||
|
|
||||||
# gf_unit tests as generated by gf_methods
|
# gf_unit tests as generated by gf_methods
|
||||||
gf_unit_w%.sh: gf_methods
|
gf_unit_w%.sh: gf_methods
|
||||||
./$^ $(@:gf_unit_w%.sh=%) -A -U > $@ || rm $@
|
./$^ $(@:gf_unit_w%.sh=%) -A -U ${VALGRIND} > $@ || rm $@
|
||||||
|
|
||||||
TESTS = gf_unit_w128.sh \
|
TESTS = gf_unit_w128.sh \
|
||||||
gf_unit_w64.sh \
|
gf_unit_w64.sh \
|
||||||
|
|
Loading…
Reference in New Issue