X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=redismodule%2Fconfigure.ac;h=48289c3ff9b21f6ea40795dfdbf929d67699da9d;hb=refs%2Fchanges%2F89%2F7589%2F3;hp=ecc73e589ed97cc48b242a219fb613c572b14537;hpb=87fd3ca9bf5cc0949dffc44ac68f0964964bee41;p=ric-plt%2Fdbaas.git diff --git a/redismodule/configure.ac b/redismodule/configure.ac index ecc73e5..48289c3 100755 --- a/redismodule/configure.ac +++ b/redismodule/configure.ac @@ -2,7 +2,6 @@ AC_INIT([redismodule], [0.0.0], [], [], [https://gerrit.oran-osc.org/r/#/admin/p AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIRS([m4]) AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_FILES([run-tests.sh], [chmod +x run-tests.sh]) AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects tar-pax]) @@ -16,6 +15,34 @@ AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET +AC_ARG_ENABLE([unit-test], + [--disable-unit-test], [Disable unit tests] +) + +AS_IF([test x"$enable_unit_test" != x"no"], + [ + PKG_CHECK_MODULES([LIBCPPUTEST],[cpputest]) + AM_CONDITIONAL([UNIT_TEST_ENABLED], [true]) + ], + [ + AM_CONDITIONAL([UNIT_TEST_ENABLED], [false]) + ] +) + +AC_ARG_ENABLE([unit-test-memcheck], + [AS_HELP_STRING([--disable-unit-test-memcheck], [Do not run unit tests with valgrind])] +) + +AS_IF([test x"$enable_unit_test_memcheck" != x"no"], + [ + AC_CHECK_PROG(VALGRIND_CHECK, valgrind, yes) + AM_CONDITIONAL([UNIT_TEST_MEMCHECK_ENABLED], [true]) + ], + [ + AM_CONDITIONAL([UNIT_TEST_MEMCHECK_ENABLED], [false]) + ] +) + # Checks for header files.