aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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@