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