diff --git a/.github/scripts/prep_valgrind_test.sh b/.github/scripts/prep_valgrind_test.sh index 004ed57f..94df925a 100644 --- a/.github/scripts/prep_valgrind_test.sh +++ b/.github/scripts/prep_valgrind_test.sh @@ -1,7 +1,7 @@ #! /bin/bash echo " check_return_code() { - if [ $? -ne 0 ]; then + if [ \$? -ne 0 ]; then echo \"Memory leak detected. Test Failed...\" exit 1 fi @@ -12,5 +12,5 @@ check_return_code() { find . -iname "*.test" -type f | while IFS= read -r line; do dirname=$(dirname "$line") realname=$(basename "$line") - echo "cd ${dirname}; valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 ./${realname}; check_return_code; cd -" >> test_valgrind.sh + echo "cd ${dirname}; valgrind --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 ./${realname}; check_return_code; cd -" >> test_valgrind.sh done