Add unit test junit and Valgrind options 77/4877/3
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Wed, 21 Oct 2020 21:42:53 +0000 (00:42 +0300)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Wed, 28 Oct 2020 04:54:06 +0000 (06:54 +0200)
Add junit option to Redis module unit tests execution.
Add more Valgrind options to enable wider set of Valgrind checks for the Redis
module code.

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I8e3335cb3566bf9e4ad3fed319443356cf59150b

redismodule/Makefile.am

index a798ed1..67a4840 100755 (executable)
@@ -116,12 +116,30 @@ test: ut_test
 endif
 
 ut_test: redismodule_ut redismodule_ut2
-       ./redismodule_ut
-       ./redismodule_ut2
+       ./redismodule_ut -ojunit
+       ./redismodule_ut2 -ojunit
 
 ut_memcheck_test: redismodule_ut redismodule_ut2
-       valgrind --error-exitcode=1 --leak-check=full ./redismodule_ut
-       valgrind --error-exitcode=1 --leak-check=full ./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