diff --git a/autobuild.sh b/autobuild.sh index 7f49ddd58..0f17ba786 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 abe37f787..5452b80d8 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=''