From 60145e2cc999cc476913bc375bc6ba052e2c9cae Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 31 May 2017 16:48:02 -0700 Subject: [PATCH] autobuild.sh && autotest_common.sh: added configuration flags for valgrind and scan-build. Change-Id: I368d0c265c588887fb0cda1bfcb9b77d919d4f8b Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/363303 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker --- autobuild.sh | 4 ++-- scripts/autotest_common.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/autobuild.sh b/autobuild.sh index 7f49ddd581..0f17ba786c 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -27,10 +27,10 @@ timing_enter build_kmod timing_exit build_kmod scanbuild='' -if hash scan-build; then +if [ $SPDK_RUN_SCANBUILD -eq 1 ] && hash scan-build; then scanbuild="scan-build -o $out/scan-build-tmp --status-bugs" fi - +echo $scanbuild $MAKE $MAKEFLAGS clean timing_enter scanbuild_make diff --git a/scripts/autotest_common.sh b/scripts/autotest_common.sh index abe37f787f..5452b80d8b 100755 --- a/scripts/autotest_common.sh +++ b/scripts/autotest_common.sh @@ -11,6 +11,8 @@ fi # Set defaults for missing test config options : ${SPDK_BUILD_DOC=1}; export SPDK_BUILD_DOC +: ${SPDK_RUN_SCANBUILD=1}; export SPDK_RUN_SCANBUILD +: ${SPDK_RUN_VALGRIND=1}; export SPDK_RUN_VALGRIND : ${SPDK_TEST_UNITTEST=1}; export SPDK_TEST_UNITTEST : ${SPDK_TEST_ISCSI=1}; export SPDK_TEST_ISCSI : ${SPDK_TEST_NVME=1}; export SPDK_TEST_NVME @@ -83,7 +85,7 @@ if [ -z "$output_dir" ]; then export output_dir fi -if hash valgrind &> /dev/null; then +if [ $SPDK_RUN_VALGRIND -eq 1 ] && hash valgrind &> /dev/null; then valgrind='valgrind --leak-check=full --error-exitcode=2' else valgrind=''