Commit 79c28aa6 authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

test/build: disable compiling unused components in tests



This patch decreases the compile time when particular test
category is not executed by tests.

Added skipping the 'examples' dir during verification
of scanbuild scanned files. Only when examples were not
compiled.

Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I41e7b9d18913fd02e2b6cbe44f933ab2e0371d28
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1172


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
parent 9ba4bb22
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ function scanbuild_make {
	xtrace_disable
	for ent in $(find app examples lib module -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
+9 −0
Original line number Diff line number Diff line
@@ -193,6 +193,15 @@ 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

if [ $SPDK_TEST_NVME_CUSE -eq 1 ]; then
	config_params+=' --with-nvme-cuse'
fi