From 85d69f7c36eca26e6fea7cbf9cb91017fd672e1d Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Thu, 18 Feb 2016 11:07:54 -0700 Subject: [PATCH] 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 --- scripts/autotest_common.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/autotest_common.sh b/scripts/autotest_common.sh index 7a4d02508..8f36e4e14 100755 --- a/scripts/autotest_common.sh +++ b/scripts/autotest_common.sh @@ -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