From 99850ca7d5cbb5b299f2670a3ec3c64d61e04c34 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Fri, 14 Sep 2018 12:59:09 -0700 Subject: [PATCH] vm_setup: add nvme-cli repo The custom nvme-cli code is used in both the NVMe and NVMe-oF tests. Change-Id: I51aab2050e1921aac899970e7abd3f1cd64836ba Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/425642 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Ziye Yang Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- test/common/config/vm_setup.conf | 1 + test/common/config/vm_setup.sh | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/common/config/vm_setup.conf b/test/common/config/vm_setup.conf index 9b810cff8..5ccba87ca 100644 --- a/test/common/config/vm_setup.conf +++ b/test/common/config/vm_setup.conf @@ -8,3 +8,4 @@ GIT_REPO_FLAMEGRAPH=https://github.com/brendangregg/FlameGraph.git GIT_REPO_QEMU=https://github.com/spdk/qemu GIT_REPO_VPP=https://gerrit.fd.io/r/vpp GIT_REPO_LIBISCSI=https://github.com/sahlberg/libiscsi +GIT_REPO_SPDK_NVME_CLI=https://github.com/spdk/nvme-cli diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index 05324cd5c..477e9558b 100755 --- a/test/common/config/vm_setup.sh +++ b/test/common/config/vm_setup.sh @@ -24,7 +24,7 @@ VM_SETUP_PATH=$(readlink -f ${BASH_SOURCE%/*}) UPGRADE=false INSTALL=false -CONF="librxe,iscsi,rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi" +CONF="librxe,iscsi,rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi,nvmecli" CONF_PATH="${VM_SETUP_PATH}/vm_setup.conf" function usage() @@ -336,6 +336,14 @@ if echo $CONF | grep -q vpp; then fi fi +if echo $CONF | grep -q nvmecli; then + if [ ! -d nvme-cli ]; then + git clone "${GIT_REPO_SPDK_NVME_CLI}" + else + echo "nvme-cli already checked out. Skipping" + fi +fi + if echo $CONF | grep -q libiscsi; then # We currently don't make any changes to the libiscsi repository for our tests, but it is possible that we will need # to later. Cloning from git is just future proofing the machines. @@ -367,8 +375,9 @@ SPDK_RUN_VALGRIND=1 SPDK_TEST_UNITTEST=1 SPDK_TEST_ISCSI=1 SPDK_TEST_ISCSI_INITIATOR=1 +# nvme and nvme-cli cannot be run at the same time on a VM. SPDK_TEST_NVME=1 -SPDK_TEST_NVME_CLI=1 +SPDK_TEST_NVME_CLI=0 SPDK_TEST_NVMF=1 SPDK_TEST_RBD=1 # requires some extra configuration. see TEST_ENV_SETUP_README