autotest/common: fail if the requested test suite can't be run
Now that SPDK_TEST_* default to 0, we can decidedly say that if the requested test suite can't be run on your system due to unmet dependencies (e.g. missing system pkg), you will get an error. Previously we would silently disable that test - e.g. when someone ran with SPDK_TEST_RBD=1 but had no librbd system pkg on his system, the SPDK autotest would return success without running any RBD tests. That was very counter-intuitive. We still silently disable a lot of tests inside our particular test scripts. Hopefully we'll stop doing that eventually. Change-Id: Ib400ba772c095b4d65fa8893a0669f3d8c3984e6 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453712 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
3674c1d3c3
commit
d193d9873b
@ -24,15 +24,6 @@ if [[ ! -z $1 ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# If certain utilities are not installed, preemptively disable the tests
|
||||
if ! hash ceph &>/dev/null; then
|
||||
SPDK_TEST_RBD=0
|
||||
fi
|
||||
|
||||
if ! hash pmempool &>/dev/null; then
|
||||
SPDK_TEST_PMDK=0
|
||||
fi
|
||||
|
||||
# Set defaults for missing test config options
|
||||
: ${SPDK_BUILD_DOC=0}; export SPDK_BUILD_DOC
|
||||
: ${SPDK_BUILD_SHARED_OBJECT=0}; export SPDK_BUILD_SHARED_OBJECT
|
||||
@ -116,8 +107,6 @@ case `uname` in
|
||||
fi
|
||||
MAKE=gmake
|
||||
MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | egrep -i 'hw.ncpu' | awk '{print $2}')}
|
||||
SPDK_RUN_ASAN=0
|
||||
SPDK_RUN_UBSAN=0
|
||||
;;
|
||||
Linux)
|
||||
DPDK_LINUX_DIR=/usr/share/dpdk/x86_64-default-linuxapp-gcc
|
||||
@ -131,11 +120,7 @@ case `uname` in
|
||||
config_params+=' --enable-ubsan'
|
||||
fi
|
||||
if [ $SPDK_RUN_ASAN -eq 1 ]; then
|
||||
if ldconfig -p | grep -q asan; then
|
||||
config_params+=' --enable-asan'
|
||||
else
|
||||
SPDK_RUN_ASAN=0
|
||||
fi
|
||||
config_params+=' --enable-asan'
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
@ -157,17 +142,10 @@ fi
|
||||
|
||||
if [ -f /usr/include/libpmemblk.h ]; then
|
||||
config_params+=' --with-pmdk'
|
||||
else
|
||||
# PMDK not installed so disable PMDK tests explicitly here
|
||||
SPDK_TEST_PMDK=0; export SPDK_TEST_PMDK
|
||||
fi
|
||||
|
||||
if [ -f /usr/include/libpmem.h ]; then
|
||||
config_params+=' --with-reduce'
|
||||
else
|
||||
# PMDK not installed so disable any reduce tests explicitly here
|
||||
# since reduce depends on libpmem
|
||||
SPDK_TEST_REDUCE=0; export SPDK_TEST_REDUCE
|
||||
fi
|
||||
|
||||
if [ -d /usr/src/fio ]; then
|
||||
@ -186,15 +164,7 @@ if [ -d /usr/include/iscsi ]; then
|
||||
libiscsi_version=`grep LIBISCSI_API_VERSION /usr/include/iscsi/iscsi.h | head -1 | awk '{print $3}' | awk -F '(' '{print $2}' | awk -F ')' '{print $1}'`
|
||||
if [ $libiscsi_version -ge 20150621 ]; then
|
||||
config_params+=' --with-iscsi-initiator'
|
||||
else
|
||||
export SPDK_TEST_ISCSI_INITIATOR=0
|
||||
fi
|
||||
else
|
||||
export SPDK_TEST_ISCSI_INITIATOR=0
|
||||
fi
|
||||
|
||||
if [ ! -d "${DEPENDENCY_DIR}/nvme-cli" ]; then
|
||||
export SPDK_TEST_NVME_CLI=0
|
||||
fi
|
||||
|
||||
if [ $SPDK_TEST_ISAL -eq 0 ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user