test/autobuild.sh: add more timing markers

Also tweak the 'scanbuild_make' timing marker so that it is only called
'scanbuild_make' if scan-build is in use.

Change-Id: I413b8a7cfd4eb2c1090dd73e78aef4ba563d0cc5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/398995
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Daniel Verkamp 2018-02-08 15:35:34 -07:00
parent 8f29093660
commit 98704ef9d4

View File

@ -31,13 +31,15 @@ fi
timing_exit build_kmod timing_exit build_kmod
scanbuild='' scanbuild=''
make_timing_label='make'
if [ $SPDK_RUN_SCANBUILD -eq 1 ] && hash scan-build; then if [ $SPDK_RUN_SCANBUILD -eq 1 ] && hash scan-build; then
scanbuild="scan-build -o $out/scan-build-tmp --status-bugs" scanbuild="scan-build -o $out/scan-build-tmp --status-bugs"
make_timing_label='scanbuild_make'
fi fi
echo $scanbuild echo $scanbuild
$MAKE $MAKEFLAGS clean $MAKE $MAKEFLAGS clean
timing_enter scanbuild_make timing_enter "$make_timing_label"
fail=0 fail=0
time $scanbuild $MAKE $MAKEFLAGS || fail=1 time $scanbuild $MAKE $MAKEFLAGS || fail=1
if [ $fail -eq 1 ]; then if [ $fail -eq 1 ]; then
@ -51,18 +53,21 @@ if [ $fail -eq 1 ]; then
else else
rm -rf $out/scan-build-tmp rm -rf $out/scan-build-tmp
fi fi
timing_exit scanbuild_make timing_exit "$make_timing_label"
# Check for generated files that are not listed in .gitignore # Check for generated files that are not listed in .gitignore
timing_enter generated_files_check
if [ `git status --porcelain | wc -l` -ne 0 ]; then if [ `git status --porcelain | wc -l` -ne 0 ]; then
echo "Generated files missing from .gitignore:" echo "Generated files missing from .gitignore:"
git status --porcelain git status --porcelain
exit 1 exit 1
fi fi
timing_exit generated_files_check
# Check that header file dependencies are working correctly by # Check that header file dependencies are working correctly by
# capturing a binary's stat data before and after touching a # capturing a binary's stat data before and after touching a
# header file and re-making. # header file and re-making.
timing_enter dependency_check
STAT1=`stat examples/nvme/identify/identify` STAT1=`stat examples/nvme/identify/identify`
sleep 1 sleep 1
touch lib/nvme/nvme_internal.h touch lib/nvme/nvme_internal.h
@ -73,13 +78,16 @@ if [ "$STAT1" == "$STAT2" ]; then
echo "Header dependency check failed" echo "Header dependency check failed"
exit 1 exit 1
fi fi
timing_exit dependency_check
# Test 'make install' # Test 'make install'
timing_enter make_install
rm -rf /tmp/spdk rm -rf /tmp/spdk
mkdir /tmp/spdk mkdir /tmp/spdk
$MAKE $MAKEFLAGS install DESTDIR=/tmp/spdk prefix=/usr $MAKE $MAKEFLAGS install DESTDIR=/tmp/spdk prefix=/usr
ls -lR /tmp/spdk ls -lR /tmp/spdk
rm -rf /tmp/spdk rm -rf /tmp/spdk
timing_exit make_install
timing_enter doxygen timing_enter doxygen
if [ $SPDK_BUILD_DOC -eq 1 ] && hash doxygen; then if [ $SPDK_BUILD_DOC -eq 1 ] && hash doxygen; then