Assure valgrind is installed before running tests

This commit is contained in:
Pithikos 2015-12-11 15:24:24 +00:00
parent 55fb89164c
commit a4a0f3b725
2 changed files with 9 additions and 0 deletions

View File

@ -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))"

View File

@ -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