mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git
synced 2026-01-26 14:13:24 +00:00
In some cases, it is not possible to use valgrind (e.g. on systems with AVX512). There may be other restrictions on the use of this utility. A separate configure option is added to leave the possibility to perform tests but without memory check. Link: https://github.com/legionus/kbd/issues/133 Signed-off-by: Alexey Gladkov <legion@kernel.org>
14 lines
459 B
Plaintext
14 lines
459 B
Plaintext
AT_ARG_OPTION(memcheck, [AS_HELP_STRING([--memcheck], [check memory leaks during tests])])
|
|
|
|
m4_define([UNITTEST_RUN_MEMCHECK],[[
|
|
libtool --mode=execute -- "$abs_srcdir"/valgrind.sh memcheck $1 || exit $?;
|
|
cat stdout ||:;
|
|
sed '/==[0-9]\+== .*/d' stderr >&2 ||:
|
|
]])
|
|
|
|
m4_define([UNITTEST_MEMCHECK],[
|
|
AS_IF([test "x$at_arg_memcheck" != "xfalse"],
|
|
[AT_CHECK([UNITTEST_RUN_MEMCHECK([$1])],[$2],[$3],[$4],[$5],[$6])],
|
|
[AT_CHECK([$1],[$2],[$3],[$4],[$5],[$6])])
|
|
])
|