autobuild.sh && autotest_common.sh: added configuration flags for valgrind and scan-build.

Change-Id: I368d0c265c588887fb0cda1bfcb9b77d919d4f8b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/363303
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Seth Howell 2017-05-31 16:48:02 -07:00 committed by Daniel Verkamp
parent 5e132b6b7a
commit 60145e2cc9
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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=''