test/autotest: update how config options are set in autotest
NOTE: pulling the vbdevcompress change into its own patch... While enabling reduce testing in autotest a few issues were found in autotest in that some options were being set based on the existence of a header without checking the test flag, if one existed. Then at the end of adding options, specific test flags were checked for 0 and the configure updated to --without. So, to make this easier to read, the options are organized in sections and where there is a header dependency as well as a test flag, both are chcekced at the same time. Change-Id: I8cdc6914906500bbac63528eb541e2b235feb797 Signed-off-by: paul luse <paul.e.luse@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455137 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
831a2c5d1e
commit
8a43cd27e6
@ -112,6 +112,48 @@ if echo -e "#include <libunwind.h>\nint main(int argc, char *argv[]) {return 0;}
|
||||
config_params+=' --enable-log-bt'
|
||||
fi
|
||||
|
||||
# for options with dependencies but no test flag, set them here
|
||||
if [ -f /usr/include/infiniband/verbs.h ]; then
|
||||
config_params+=' --with-rdma'
|
||||
fi
|
||||
|
||||
if [ -d /usr/src/fio ]; then
|
||||
config_params+=' --with-fio=/usr/src/fio'
|
||||
fi
|
||||
|
||||
if [ -d ${DEPENDENCY_DIR}/vtune_codes ]; then
|
||||
config_params+=' --with-vtune='${DEPENDENCY_DIR}'/vtune_codes'
|
||||
fi
|
||||
|
||||
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'
|
||||
fi
|
||||
fi
|
||||
|
||||
# for options with both dependencies and a test flag, set them here
|
||||
if [ -f /usr/include/libpmemblk.h ] && [ $SPDK_TEST_PMDK -eq 1 ]; then
|
||||
config_params+=' --with-pmdk'
|
||||
fi
|
||||
|
||||
if [ -f /usr/include/libpmem.h ] && [ $SPDK_TEST_REDUCE -eq 1 ]; then
|
||||
if [ $SPDK_TEST_ISAL -eq 1 ]; then
|
||||
config_params+=' --with-reduce'
|
||||
else
|
||||
echo "reduce not enabled because isal is not enabled."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d /usr/include/rbd ] && [ -d /usr/include/rados ] && [ $SPDK_TEST_RBD -eq 1 ]; then
|
||||
if [ $SPDK_TEST_ISAL -eq 0 ]; then
|
||||
config_params+=' --with-rbd'
|
||||
else
|
||||
echo "rbd not enabled because isal is enabled."
|
||||
fi
|
||||
fi
|
||||
|
||||
# for options with no required dependencies, just test flags, set them here
|
||||
if [ $SPDK_TEST_CRYPTO -eq 1 ]; then
|
||||
config_params+=' --with-crypto'
|
||||
fi
|
||||
@ -132,6 +174,10 @@ if [ "$(uname -s)" = "Linux" ]; then
|
||||
config_params+=' --enable-coverage'
|
||||
fi
|
||||
|
||||
if [ $SPDK_TEST_ISAL -eq 0 ]; then
|
||||
config_params+=' --without-isal'
|
||||
fi
|
||||
|
||||
# By default, --with-dpdk is not set meaning the SPDK build will use the DPDK submodule.
|
||||
# If a DPDK installation is found in a well-known location though, WITH_DPDK_DIR will be
|
||||
# set which will override the default and use that DPDK installation instead.
|
||||
@ -139,45 +185,6 @@ if [ ! -z "$WITH_DPDK_DIR" ]; then
|
||||
config_params+=" --with-dpdk=$WITH_DPDK_DIR"
|
||||
fi
|
||||
|
||||
if [ -f /usr/include/infiniband/verbs.h ]; then
|
||||
config_params+=' --with-rdma'
|
||||
fi
|
||||
|
||||
if [ -f /usr/include/libpmemblk.h ]; then
|
||||
config_params+=' --with-pmdk'
|
||||
fi
|
||||
|
||||
if [ -f /usr/include/libpmem.h ]; then
|
||||
config_params+=' --with-reduce'
|
||||
fi
|
||||
|
||||
if [ -d /usr/src/fio ]; then
|
||||
config_params+=' --with-fio=/usr/src/fio'
|
||||
fi
|
||||
|
||||
if [ -d ${DEPENDENCY_DIR}/vtune_codes ]; then
|
||||
config_params+=' --with-vtune='${DEPENDENCY_DIR}'/vtune_codes'
|
||||
fi
|
||||
|
||||
if [ -d /usr/include/rbd ] && [ -d /usr/include/rados ]; then
|
||||
config_params+=' --with-rbd'
|
||||
fi
|
||||
|
||||
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'
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $SPDK_TEST_ISAL -eq 0 ]; then
|
||||
config_params+=' --without-isal'
|
||||
fi
|
||||
|
||||
if [ $SPDK_TEST_REDUCE -eq 0 ]; then
|
||||
config_params+=' --without-reduce'
|
||||
fi
|
||||
|
||||
export config_params
|
||||
|
||||
if [ -z "$output_dir" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user