autotest: enforce Valgrind checking for unit tests

If any memory is leaked or other errors occur, valgrind will now exit
with an error code and fail the tests.

Change-Id: I6c65cae17dcd21eb97d70bd82df828eaa0f8f109
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-02-18 11:07:54 -07:00 committed by Gerrit Code Review
parent c162dd0e38
commit 85d69f7c36

View File

@ -33,8 +33,7 @@ if [ -z "$output_dir" ]; then
fi
if hash valgrind &> /dev/null; then
# TODO: add --error-exitcode=2 when all Valgrind warnings are fixed
valgrind='valgrind --leak-check=full'
valgrind='valgrind --leak-check=full --error-exitcode=2'
else
valgrind=''
fi