Changeset 336

Show
Ignore:
Timestamp:
01/30/06 17:46:35 (3 years ago)
Author:
conrad
Message:

add optional testing under valgrind (./configure --enable-valgrind-testing)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libremix/trunk/configure.ac

    r320 r336  
    1515if test $HAVE_DOXYGEN = "false"; then 
    1616             AC_MSG_WARN([*** doxygen not found, docs will not be built]) 
     17fi 
     18 
     19# Check for valgrind 
     20VALGRIND_ENVIRONMENT="" 
     21ac_enable_valgrind=no 
     22AC_ARG_ENABLE(valgrind-testing, 
     23     [  --enable-valgrind-testing     enable running of tests inside Valgrind ],     [ ac_enable_valgrind=yes ], [ ac_enable_valgrind=no] ) 
     24 
     25if test "x${ac_enable_valgrind}" = xyes ; then 
     26  if test "x${enable_shared}" = xyes ; then 
     27    VALGRIND_ENVIRONMENT="libtool --mode=execute " 
     28  fi 
     29 
     30  AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no) 
     31  if test "x$HAVE_VALGRIND" = xyes ; then 
     32    VALGRIND_ENVIRONMENT="$VALGRIND_ENVIRONMENT valgrind -q --leak-check=yes --show-reachable=yes --num-callers=100" 
     33    AC_SUBST(VALGRIND_ENVIRONMENT) 
     34    TESTS_INFO="'make check' test suite will be run under: 
     35  ${VALGRIND_ENVIRONMENT}" 
     36  else 
     37    TESTS_INFO="'make check' to run test suite (Valgrind not found)" 
     38  fi 
     39else 
     40  TESTS_INFO="'make check' to run test suite (Valgrind testing not enabled)" 
    1741fi 
    1842 
  • libremix/trunk/src/tests/Makefile.am

    r335 r336  
    88 
    99# Test programs 
     10 
     11TESTS_ENVIRONMENT = $(VALGRIND_ENVIRONMENT) 
    1012 
    1113test: check