autobuild: Confirm we are building all files w/ scanbuild
This gives us an assurance that we know scan-build is being run against all relevant files in the repository. Change-Id: Ic0b871e98a9ea7acd2d6b2a99ab81955af29fc66 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479898 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com>
This commit is contained in:
parent
de30327534
commit
253fb41b65
23
autobuild.sh
23
autobuild.sh
@ -54,6 +54,27 @@ function make_fail_cleanup {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function scanbuild_make {
|
||||||
|
pass=true
|
||||||
|
$scanbuild $MAKE $MAKEFLAGS > $out/build_output.txt && rm -rf $out/scan-build-tmp || make_fail_cleanup
|
||||||
|
for ent in $(find app examples lib module -type f | grep -vF ".h"); do
|
||||||
|
if file -bi $ent | grep -q 'text/x-c'; then
|
||||||
|
echo $ent | sed 's/\.cp\{0,2\}$//g' >> $out/all_c_files.txt
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
sed -n '/Leaving directory /,$p' $out/build_output.txt | grep -E "CC|CXX" | sed 's/\s\s\(CC\|CXX\)\s//g' | sed 's/\.o//g' > $out/built_c_files.txt
|
||||||
|
paste -d '\n' $out/all_c_files.txt $out/built_c_files.txt $rootdir/test/common/skipped_build_files.txt | grep -vE "^test|lib/env_ocf|#" | sort | uniq -u > $out/unbuilt_c_files.txt
|
||||||
|
|
||||||
|
if [ $(wc -l < $out/unbuilt_c_files.txt) -ge 1 ]; then
|
||||||
|
echo "missing files"
|
||||||
|
cat $out/unbuilt_c_files.txt
|
||||||
|
pass=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
$pass
|
||||||
|
}
|
||||||
|
|
||||||
function porcelain_check {
|
function porcelain_check {
|
||||||
if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
|
if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
|
||||||
echo "Generated files missing from .gitignore:"
|
echo "Generated files missing from .gitignore:"
|
||||||
@ -117,7 +138,7 @@ function build_doc {
|
|||||||
function autobuild_test_suite {
|
function autobuild_test_suite {
|
||||||
run_test "autobuild_check_format" ./scripts/check_format.sh
|
run_test "autobuild_check_format" ./scripts/check_format.sh
|
||||||
run_test "autobuild_check_so_deps" $rootdir/test/make/check_so_deps.sh
|
run_test "autobuild_check_so_deps" $rootdir/test/make/check_so_deps.sh
|
||||||
run_test "scanbuild_make" $scanbuild $MAKE $MAKEFLAGS && rm -rf $out/scan-build-tmp || make_fail_cleanup
|
run_test "scanbuild_make" scanbuild_make
|
||||||
run_test "autobuild_generated_files_check" porcelain_check
|
run_test "autobuild_generated_files_check" porcelain_check
|
||||||
run_test "autobuild_header_dependency_check" header_dependency_check
|
run_test "autobuild_header_dependency_check" header_dependency_check
|
||||||
run_test "autobuild_make_install" $MAKE $MAKEFLAGS install DESTDIR=/tmp/spdk prefix=/usr
|
run_test "autobuild_make_install" $MAKE $MAKEFLAGS install DESTDIR=/tmp/spdk prefix=/usr
|
||||||
|
34
test/common/skipped_build_files.txt
Normal file
34
test/common/skipped_build_files.txt
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Not configured to test vtune.
|
||||||
|
lib/bdev/vtune
|
||||||
|
|
||||||
|
# Not configured to test VPP
|
||||||
|
module/sock/vpp/vpp
|
||||||
|
|
||||||
|
# Not configured to test rocksdb env file
|
||||||
|
lib/rocksdb/env_spdk.cc
|
||||||
|
|
||||||
|
# Not configured to test FC
|
||||||
|
lib/nvmf/fc
|
||||||
|
lib/nvmf/fc_ls
|
||||||
|
|
||||||
|
# Not configured for Neon testing
|
||||||
|
lib/util/base64_neon
|
||||||
|
|
||||||
|
# Files related to testing our internal vhost implementation.
|
||||||
|
lib/rte_vhost/fd_man
|
||||||
|
lib/rte_vhost/socket
|
||||||
|
lib/rte_vhost/vhost
|
||||||
|
lib/rte_vhost/vhost_user
|
||||||
|
lib/vhost/vhost_nvme
|
||||||
|
lib/virtio/virtio_user/vhost_user
|
||||||
|
|
||||||
|
# Cuse related files, enable when ready.
|
||||||
|
lib/nvme/nvme_cuse
|
||||||
|
module/bdev/nvme/bdev_nvme_cuse_rpc
|
||||||
|
|
||||||
|
# Currently we don't have this plumbed for testing, enable when ready.
|
||||||
|
module/bdev/uring/bdev_uring
|
||||||
|
module/bdev/uring/bdev_uring_rpc
|
||||||
|
|
||||||
|
# Currently not testing blobfs_fuse, enable when ready.
|
||||||
|
module/blobfs/bdev/blobfs_fuse
|
Loading…
Reference in New Issue
Block a user