From ec2e2594023bb57a14ec42da7eebb82ecdb41b1a Mon Sep 17 00:00:00 2001 From: Vitaliy Mysak Date: Mon, 7 Jan 2019 19:40:59 +0000 Subject: [PATCH] scripts: vm_setup.sh add OCF dependencies Add auto installation procedure for OCF dependencies Change-Id: I75fc1b26e0eb7132a310cff62cad61bb7c3b05ee Signed-off-by: Vitaliy Mysak Reviewed-on: https://review.gerrithub.io/c/439359 Reviewed-by: Darek Stojaczyk Reviewed-by: Changpeng Liu Reviewed-by: Tomasz Zawadzki Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System --- test/common/config/vm_setup.conf | 1 + test/common/config/vm_setup.sh | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/test/common/config/vm_setup.conf b/test/common/config/vm_setup.conf index e43293489..7716988fe 100644 --- a/test/common/config/vm_setup.conf +++ b/test/common/config/vm_setup.conf @@ -11,3 +11,4 @@ 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 DRIVER_LOCATION_QAT=https://01.org/sites/default/files/downloads/intelr-quickassist-technology/qat1.7.l.4.3.0-00033.tar.gz +GIT_REPO_CAS=https://github.com/Open-CAS/ocf diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index 6e11d6b92..aa4fd8870 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,nvmecli,qat" +CONF="librxe,iscsi,rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi,nvmecli,qat,ocf" function install_rxe_cfg() { @@ -285,6 +285,20 @@ function install_libiscsi() fi } +function install_ocf() +{ + local version="v18.12" + local targetdir="/usr/src/ocf" + + if echo $CONF | grep -q ocf; then + if [ ! -d "$targetdir" ]; then + sudo git clone "${GIT_REPO_OCF}" "$targetdir" -b "$version" + else + echo "OCF already installed. Skipping" + fi + fi +} + function usage() { echo "This script is intended to automate the environment setup for a fedora linux virtual machine." @@ -346,6 +360,7 @@ cd ~ : ${GIT_REPO_SPDK_NVME_CLI=https://github.com/spdk/nvme-cli}; export GIT_REPO_SPDK_NVME_CLI : ${GIT_REPO_INTEL_IPSEC_MB=https://github.com/spdk/intel-ipsec-mb.git}; export GIT_REPO_INTEL_IPSEC_MB : ${DRIVER_LOCATION_QAT=https://01.org/sites/default/files/downloads/intelr-quickassist-technology/qat1.7.l.4.3.0-00033.tar.gz}; export DRIVER_LOCATION_QAT +: ${GIT_REPO_OCF=https://github.com/Open-OCF/ocf}; export GIT_REPO_OCF jobs=$(($(nproc)*2)) @@ -426,6 +441,7 @@ install_vpp& install_nvmecli& install_libiscsi& install_qat& +install_ocf& wait # create autorun-spdk.conf in home folder. This is sourced by the autotest_common.sh file. @@ -456,6 +472,7 @@ SPDK_TEST_BLOBFS=1 SPDK_TEST_PMDK=1 SPDK_TEST_LVOL=1 SPDK_TEST_JSON=1 +SPDK_TEST_OCF=1 SPDK_RUN_ASAN=1 SPDK_RUN_UBSAN=1 # doesn't work on vm