Skip to content
Snippets Groups Projects
Commit f306a235 authored by Petter Reinholdtsen's avatar Petter Reinholdtsen
Browse files

Switched valgrind run to use LOG_COMPILER and fail on valgrind errors.

This will avoid running valgrind on bash and instead validate the
test programs themselves.
parent 2fb974cf
No related branches found
No related tags found
1 merge request!18Switched valgrind run to use LOG_COMPILER and fail on valgrind errors.
Pipeline #6156 failed
......@@ -62,6 +62,12 @@ autotools-enable-telemetry:
variables:
CONFIG_FLAGS: --enable-telemetry
autotools-enable-valgrind-testing:
extends: .autoconf
variables:
INSTALL_EXTRA: libtool valgrind
CONFIG_FLAGS: --enable-valgrind-testing
scons:
stage: build
before_script:
......
......@@ -143,24 +143,17 @@ if test $BUILD_SPEC = "false"; then
AC_MSG_WARN([*** Format Specification will not built.])
fi
dnl Check for valgrind
VALGRIND_ENVIRONMENT=""
ac_enable_valgrind=no
# Check for valgrind
AC_ARG_ENABLE(valgrind-testing,
AS_HELP_STRING([--enable-valgrind-testing], [Enable running of tests inside Valgrind]),
[ ac_enable_valgrind=$enableval ], [ ac_enable_valgrind=no] )
if test "x${ac_enable_valgrind}" = xyes ; then
if test "x${enable_shared}" = xyes ; then
VALGRIND_ENVIRONMENT="libtool --mode=execute "
fi
AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no)
if test "x$HAVE_VALGRIND" = xyes ; then
VALGRIND_ENVIRONMENT="$VALGRIND_ENVIRONMENT valgrind -q --leak-check=yes --show-reachable=yes --num-callers=100"
AC_SUBST(VALGRIND_ENVIRONMENT)
TESTS_INFO="Type 'make check' to run test suite. Tests will be run under:
${VALGRIND_ENVIRONMENT}"
AS_HELP_STRING([--enable-valgrind-testing],[enable running of tests inside Valgrind (default disabled)]))
if test "x$enable_valgrind_testing" = "xyes"
then
AC_PATH_PROG(VALGRIND,valgrind,)
if test "x$VALGRIND" != "x"
then
VALGRIND="$VALGRIND -q --error-exitcode=99 --leak-check=full --show-reachable=yes --num-callers=50"
TESTS_INFO="Test suite will be run under:
${VALGRIND}"
else
TESTS_INFO="Type 'make check' to run test suite (Valgrind not found)"
fi
......
......@@ -10,7 +10,7 @@ THEORAENC_LIBS = $(THEORADIR)/libtheoraenc.la \
$(THEORADIR)/libtheoradec.la $(OGG_LIBS)
test: check
TESTS_ENVIRONMENT = $(VALGRIND_ENVIRONMENT)
LOG_COMPILER=$(LIBTOOL) --mode=execute $(VALGRIND)
TESTS_DEC = noop_theora \
comment comment_theoradec comment_theora
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment