autobuild: optimizations around compiling tests.

This commit combines a couple of small optimizations to
help make the unittest scan-build checks more comprehensive
while not taking extra time to compile examples when we are
doing functional tests that don't require them.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1d3af0026b4be6e799516ef52e9414790eab85e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1270
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Seth Howell 2020-03-13 18:27:05 -07:00 committed by Tomasz Zawadzki
parent 91407607e5
commit 9cb8c2387a
3 changed files with 16 additions and 7 deletions

View File

@ -58,9 +58,8 @@ function scanbuild_make {
pass=true
$scanbuild $MAKE $MAKEFLAGS > $out/build_output.txt && rm -rf $out/scan-build-tmp || make_fail_cleanup
xtrace_disable
for ent in $(find app examples lib module -type f | grep -vF ".h"); do
for ent in $(find app examples lib module test -type f | grep -vF ".h"); do
if [[ $ent == lib/env_ocf* ]]; then continue; fi
if [[ SPDK_RUN_FUNCTIONAL_TEST -eq 0 && $ent == examples* ]]; then continue; fi
if file -bi $ent | grep -q 'text/x-c'; then
echo $ent | sed 's/\.cp\{0,2\}$//g' >> $out/all_c_files.txt
fi

View File

@ -197,11 +197,6 @@ if [ -d /usr/include/iscsi ]; then
fi
fi
if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 0 ]; then
config_params+=' --disable-tests'
config_params+=' --disable-examples'
fi
if [ $SPDK_TEST_UNITTEST -eq 0 ]; then
config_params+=' --disable-unit-tests'
fi

View File

@ -10,6 +10,8 @@ lib/rocksdb/env_spdk.cc
# Not configured to test FC
lib/nvmf/fc
lib/nvmf/fc_ls
test/unit/lib/nvmf/fc.c/fc_ut
test/unit/lib/nvmf/fc_ls.c/fc_ls_ut
# Not configured for Neon testing
lib/util/base64_neon
@ -33,3 +35,16 @@ module/sock/uring/uring
# Currently not testing blobfs_fuse, enable when ready.
module/blobfs/bdev/blobfs_fuse
test/blobfs/fuse/fuse
# These files all represent c files that are only compiled by direct inclusion in other files.
test/common/lib/test_env
test/common/lib/test_sock
test/common/lib/ut_multithread
test/unit/lib/blob/bs_dev_common
test/unit/lib/blob/bs_scheduler
test/unit/lib/ftl/common/utils
test/unit/lib/iscsi/common
test/unit/lib/json_mock
test/unit/lib/sock/uring.c/uring_ut