Commit 9fcb1cb0 authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

build: add option to disable building unit tests



If unit tests are not required, add option to disable them.

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 34f53ab7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -70,9 +70,12 @@ CONFIG_UBSAN=n
# Build with Thread Sanitizer enabled
CONFIG_TSAN=n

# Build tests
# Build functional tests
CONFIG_TESTS=y

# Build unit tests
CONFIG_UNIT_TESTS=y

# Build examples
CONFIG_EXAMPLES=y

+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ DIRS-y += module
DIRS-$(CONFIG_SHARED) += shared_lib
DIRS-y += app include
DIRS-$(CONFIG_EXAMPLES) += examples
DIRS-$(CONFIG_TESTS) += test
DIRS-y += test
DIRS-$(CONFIG_IPSEC_MB) += ipsecbuild
DIRS-$(CONFIG_ISAL) += isalbuild

+8 −1
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@ function usage()
	echo " --enable-lto              Enable link-time optimization"
	echo " --enable-pgo-capture      Enable generation of profile guided optimization data"
	echo " --enable-pgo-use          Use previously captured profile guided optimization data"
	echo " --disable-tests           Disable building of tests"
	echo " --disable-tests           Disable building of functional tests"
	echo " --disable-unit-tests      Disable building of unit tests"
	echo " --disable-examples        Disable building of examples"
	echo ""
	echo "Specifying Dependencies:"
@@ -241,6 +242,12 @@ for i in "$@"; do
		--disable-tests)
			CONFIG[TESTS]=n
			;;
		--enable-unit-tests)
			CONFIG[UNIT_TESTS]=y
			;;
		--disable-unit-tests)
			CONFIG[UNIT_TESTS]=n
			;;
		--enable-examples)
			CONFIG[EXAMPLES]=y
			;;
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ BuildArch: noarch
%build
./configure --prefix=%{_usr} \
	--disable-tests \
	--disable-unit-tests \
	--without-crypto \
	--with-dpdk=/usr/share/dpdk/x86_64-default-linuxapp-gcc \
	--without-fio \
+3 −2
Original line number Diff line number Diff line
@@ -35,9 +35,10 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

# These directories contain tests.
TESTDIRS = app bdev blobfs cpp_headers env event nvme unit rpc_client
TESTDIRS = app bdev blobfs cpp_headers env event nvme rpc_client

DIRS-y = $(TESTDIRS)
DIRS-$(CONFIG_TESTS) += $(TESTDIRS)
DIRS-$(CONFIG_UNIT_TESTS) += unit

.PHONY: all clean $(DIRS-y)