From 1033d120404c0e41ced5f36361e412ac03a3461f Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Tue, 20 Jul 2010 14:38:44 +0000 Subject: Report generators for unit tests and memory checks. Configure with --enable-testing. --- configure.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 6b5d65a3..db1376f9 100644 --- a/configure.in +++ b/configure.in @@ -700,6 +700,22 @@ if test "x$PROFILING" = xyes; then fi fi +################################################################################ +dnl -- Enable testing +AC_MSG_CHECKING(whether to enable unit testing) +AC_ARG_ENABLE(testing, + AC_HELP_STRING(--enable-testing, [enable testing targets in the makefile]), + TESTING=$enableval, TESTING=no) +AC_MSG_RESULT($TESTING) + +if test "$TESTING" = yes; then + AC_PATH_PROG(RUBY19, ruby1.9) + AC_PATH_PROG(VALGRIND, valgrind) + if test -z "$RUBY19" -o -z "$VALGRIND"; then + AC_MSG_ERROR([ruby1.9 and valgrind are required for testing]) + fi +fi + ################################################################################ dnl -- Disable devmapper AC_MSG_CHECKING(whether to use device-mapper) @@ -1260,6 +1276,7 @@ AC_SUBST(SELINUX_PC) AC_SUBST(SNAPSHOTS) AC_SUBST(STATICDIR) AC_SUBST(STATIC_LINK) +AC_SUBST(TESTING) AC_SUBST(UDEV_LIBS) AC_SUBST(UDEV_PC) AC_SUBST(UDEV_RULES) -- cgit