X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=redismodule%2FMakefile.am;h=67a484089d9f970ff8869b2b5ed115ce67aae592;hb=c57ea609a5677c718ff3c2a493d3ac97af1f35ab;hp=2c41e1806ac29957e8da9c7c143f4a4fca04a82a;hpb=4ee7adebe245a8b294c771b20d5fb494707312a5;p=ric-plt%2Fdbaas.git diff --git a/redismodule/Makefile.am b/redismodule/Makefile.am index 2c41e18..67a4840 100755 --- a/redismodule/Makefile.am +++ b/redismodule/Makefile.am @@ -109,15 +109,44 @@ redismodule_ut2_LDFLAGS = -Wl,-rpath=${libdir} ${UT_COVERAGE_LDFLAGS} redismodule_ut2_LDADD = -L${libdir} $(LIBCPPUTEST_LIBS) -lgcov -test: redismodule_ut redismodule_ut2 - ./run-tests.sh +if UNIT_TEST_MEMCHECK_ENABLED +test: ut_memcheck_test +else +test: ut_test +endif + +ut_test: redismodule_ut redismodule_ut2 + ./redismodule_ut -ojunit + ./redismodule_ut2 -ojunit + +ut_memcheck_test: redismodule_ut redismodule_ut2 + valgrind --error-exitcode=1 \ + --tool=memcheck \ + --show-emwarns=yes \ + -v -d \ + --stats=yes \ + --read-var-info=yes \ + --leak-check=full \ + --log-file=/tmp/redimodule_ut_valgrind_leak.log \ + --track-origins=yes \ + ./redismodule_ut + valgrind --error-exitcode=1 \ + --tool=memcheck \ + --show-emwarns=yes \ + -v -d \ + --stats=yes \ + --read-var-info=yes \ + --leak-check=full \ + --log-file=/tmp/redimodule_ut2_valgrind_leak.log \ + --track-origins=yes \ + ./redismodule_ut2 TESTS = run-tests.sh else test: - echo 'enable ut with configure flag: --enable-unit-test' + echo 'enable ut with configure flag: --enable-unit-test and valgrind memcheck with: --enable-unit-test-memcheck' exit 1 endif #UNIT_TEST_ENABLED