Adds support to make check-valgrind

make check-valgrind is useful to identify any memory related issue.
This commit is contained in:
Felipe Zimmerle
2016-06-14 14:04:03 -03:00
parent f0155e3f32
commit 8cdb138076
4 changed files with 255 additions and 4 deletions

View File

@@ -1,11 +1,18 @@
#!/bin/bash
TEST=$1 1> /dev/null
cd test 1> /dev/null
if [[ $TEST == *"test-cases/regression/"* ]]
length=$(($#-1))
array=${@:1:$length}
PARAM=$array
FILE=${@: -1}
if [[ $FILE == *"test-cases/regression/"* ]]
then
./regression_tests ../$*
$VALGRIND $PARAM ./regression_tests ../$FILE
echo $VALGRIND $PARAM ./regression_tests ../$FILE
else
./unit_tests ../$*
$VALGRIND $PARAM ./unit_tests ../$FILE
fi
cd - 1> /dev/null