vm_setup: Clone spdk from a separate function
Change-Id: I59030c4570a03f8c6dfcf4a5f86426e3b5875744 Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2527 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com>
This commit is contained in:
parent
3920b81681
commit
9d7b1f7525
@ -1,3 +1,16 @@
|
||||
function install_spdk() {
|
||||
mkdir -p spdk_repo/output || echo "Can not create spdk_repo/output directory."
|
||||
|
||||
if [ -d spdk_repo/spdk ]; then
|
||||
echo "spdk source already present, not cloning"
|
||||
else
|
||||
git -C spdk_repo clone "${GIT_REPO_SPDK}"
|
||||
fi
|
||||
git -C spdk_repo/spdk config submodule.dpdk.url "${GIT_REPO_DPDK}"
|
||||
git -C spdk_repo/spdk config submodule.intel-ipsec-mb.url "${GIT_REPO_INTEL_IPSEC_MB}"
|
||||
git -C spdk_repo/spdk submodule update --init --recursive
|
||||
}
|
||||
|
||||
function install_refspdk() {
|
||||
local last_release
|
||||
local output_dir
|
||||
@ -318,6 +331,14 @@ sources+=(install_fio)
|
||||
|
||||
sudo mkdir -p /usr/{,local}/src
|
||||
|
||||
if [[ $INSTALL_REFSPDK == true ]]; then
|
||||
# Serialize builds as refspdk depends on spdk
|
||||
install_spdk
|
||||
install_refspdk
|
||||
else
|
||||
sources+=(install_spdk)
|
||||
fi
|
||||
|
||||
for source in "${sources[@]}"; do
|
||||
source_conf=${source^^}
|
||||
if [[ ${!source_conf} == true ]]; then
|
||||
|
@ -24,7 +24,7 @@ VM_SETUP_PATH=$(readlink -f ${BASH_SOURCE%/*})
|
||||
|
||||
UPGRADE=false
|
||||
INSTALL=false
|
||||
CONF="rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi,nvmecli,qat,refspdk"
|
||||
CONF="rocksdb,fio,flamegraph,tsocks,qemu,vpp,libiscsi,nvmecli,qat,spdk,refspdk"
|
||||
gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
|
||||
|
||||
if [[ -e /etc/os-release ]]; then
|
||||
@ -122,17 +122,6 @@ if $INSTALL; then
|
||||
install "${packages[@]}"
|
||||
fi
|
||||
|
||||
mkdir -p spdk_repo/output || echo "Can not create spdk_repo/output directory."
|
||||
|
||||
if [ -d spdk_repo/spdk ]; then
|
||||
echo "spdk source already present, not cloning"
|
||||
else
|
||||
git -C spdk_repo clone "${GIT_REPO_SPDK}"
|
||||
fi
|
||||
git -C spdk_repo/spdk config submodule.dpdk.url "${GIT_REPO_DPDK}"
|
||||
git -C spdk_repo/spdk config submodule.intel-ipsec-mb.url "${GIT_REPO_INTEL_IPSEC_MB}"
|
||||
git -C spdk_repo/spdk submodule update --init --recursive
|
||||
|
||||
source "$vmsetupdir/pkgdep/git"
|
||||
|
||||
# create autorun-spdk.conf in home folder. This is sourced by the autotest_common.sh file.
|
||||
|
Loading…
Reference in New Issue
Block a user