aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Buhler <pabuhler@cisco.com>2017-10-16 13:09:39 +0200
committerPascal Buhler <pabuhler@cisco.com>2017-10-16 13:09:39 +0200
commitf358700f8655f37911877a8b72468ee1655387d2 (patch)
tree4cbe4cd982f90d24ade3663c1828ee5db17f532a
parenteb39cf1509b153de6422e6f5571346720bac85ff (diff)
downloadlibsrtp2-f358700f8655f37911877a8b72468ee1655387d2.tar.gz
Add a runtest-valgrind target
Ensure this target is also run in travis-ci
-rw-r--r--.travis.yml16
-rw-r--r--Makefile.in7
2 files changed, 23 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 30ebefd..27965dd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -68,3 +68,19 @@ matrix:
- clang-format-3.9
script:
- ./format.sh -d
+
+ # valgrind
+ - os: linux
+ env:
+ - TEST="valgrind (openssl)"
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gcc-6
+ - valgrind
+ script:
+ - ./configure --enable-openssl
+ - make
+ - make runtest-valgrind
diff --git a/Makefile.in b/Makefile.in
index 63021c2..cc2ddf1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -6,6 +6,7 @@
# targets:
#
# runtest runs test applications
+# runtest-valgrind runs test applications with valgrind
# test builds test applications
# libsrtp2.a static library implementing srtp
# libsrtp2.so shared library implementing srtp
@@ -37,6 +38,12 @@ endif
@echo "libsrtp2 test applications passed."
$(MAKE) -C crypto runtest
+runtest-valgrind: test
+ @echo "running libsrtp2 test applications... (valgrind)"
+ valgrind --error-exitcode=1 --leak-check=full test/test_srtp$(EXE) -v >/dev/null
+ valgrind --error-exitcode=1 --leak-check=full test/srtp_driver$(EXE) -v >/dev/null
+ @echo "libsrtp2 test applications passed. (valgrind)"
+
# makefile variables
CC = @CC@