diff --git a/tests/funcs.sh b/tests/funcs.sh index f2a1f1d..951757e 100644 --- a/tests/funcs.sh +++ b/tests/funcs.sh @@ -5,6 +5,14 @@ # want to use any of the functions # +function assure_installed_valgrind { + valgrind --version &> /dev/null + if (( $? != 0 )); then + msg="Valgrind seems to not be installed." + err "$msg" "$msg" + fi +} + function needle { #needle #haystack python -c "import re; print(re.search(r'$1', '$2').group(0))" diff --git a/tests/memleaks.sh b/tests/memleaks.sh index 39c0ac7..2faeb43 100755 --- a/tests/memleaks.sh +++ b/tests/memleaks.sh @@ -55,6 +55,7 @@ function test_thread_free_multi { #threads #times # Run tests +assure_installed_valgrind test_thread_free 1 test_thread_free 2 test_thread_free 4