pkgdep/git: Put sources installation into a separate function
This allows other entities to source pkgdep/git and safely use other available routines. Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: I81c87ef124bdfc6d8cc548bc3a0ff4c19867c232 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6339 Community-CI: Mellanox Build Bot 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>
This commit is contained in:
parent
fc7d5d4e27
commit
0081cfeaae
@ -471,6 +471,56 @@ function install_ice() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function install_sources() {
|
||||||
|
if [[ $ID == centos ]] && (( VERSION_ID == 7 )); then
|
||||||
|
# install proper version of the git first
|
||||||
|
install_git
|
||||||
|
fi
|
||||||
|
|
||||||
|
IFS="," read -ra conf_env <<< "$CONF"
|
||||||
|
for conf in "${conf_env[@]}"; do
|
||||||
|
export "INSTALL_${conf^^}=true"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $OSID == freebsd ]]; then
|
||||||
|
jobs=$(($(sysctl -n hw.ncpu) * 2))
|
||||||
|
else
|
||||||
|
jobs=$(($(nproc) * 2))
|
||||||
|
sources+=(
|
||||||
|
install_irdma
|
||||||
|
install_libiscsi
|
||||||
|
install_nvmecli
|
||||||
|
install_qat
|
||||||
|
install_rocksdb
|
||||||
|
install_flamegraph
|
||||||
|
install_qemu
|
||||||
|
install_igb_uio
|
||||||
|
install_ice
|
||||||
|
)
|
||||||
|
install_extra_pkgs
|
||||||
|
fi
|
||||||
|
sources+=(install_fio)
|
||||||
|
sources+=(install_vagrant)
|
||||||
|
sources+=(install_spdk)
|
||||||
|
|
||||||
|
sudo mkdir -p /usr/{,local}/src
|
||||||
|
sudo mkdir -p "$GIT_REPOS"
|
||||||
|
|
||||||
|
for source in "${sources[@]}"; do
|
||||||
|
source_conf=${source^^}
|
||||||
|
if [[ ${!source_conf} == true ]]; then
|
||||||
|
"$source"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $INSTALL_REFSPDK == true ]]; then
|
||||||
|
# Serialize builds as refspdk depends on spdk
|
||||||
|
[[ $INSTALL_SPDK != true ]] && install_spdk
|
||||||
|
install_refspdk latest
|
||||||
|
install_refspdk LTS
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
GIT_VERSION=2.25.1
|
GIT_VERSION=2.25.1
|
||||||
IRDMA_VERSION=1.2.21
|
IRDMA_VERSION=1.2.21
|
||||||
ICE_VERSION=1.2.1
|
ICE_VERSION=1.2.1
|
||||||
@ -503,50 +553,3 @@ export ICE_DRIVER
|
|||||||
GIT_REPOS=${GIT_REPOS:-$HOME}
|
GIT_REPOS=${GIT_REPOS:-$HOME}
|
||||||
|
|
||||||
gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
|
gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
|
||||||
if [[ $ID == centos ]] && (( VERSION_ID == 7 )); then
|
|
||||||
# install proper version of the git first
|
|
||||||
install_git
|
|
||||||
fi
|
|
||||||
|
|
||||||
IFS="," read -ra conf_env <<< "$CONF"
|
|
||||||
for conf in "${conf_env[@]}"; do
|
|
||||||
export "INSTALL_${conf^^}=true"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $OSID == freebsd ]]; then
|
|
||||||
jobs=$(($(sysctl -n hw.ncpu) * 2))
|
|
||||||
else
|
|
||||||
jobs=$(($(nproc) * 2))
|
|
||||||
sources+=(
|
|
||||||
install_irdma
|
|
||||||
install_libiscsi
|
|
||||||
install_nvmecli
|
|
||||||
install_qat
|
|
||||||
install_rocksdb
|
|
||||||
install_flamegraph
|
|
||||||
install_qemu
|
|
||||||
install_igb_uio
|
|
||||||
install_ice
|
|
||||||
)
|
|
||||||
install_extra_pkgs
|
|
||||||
fi
|
|
||||||
sources+=(install_fio)
|
|
||||||
sources+=(install_vagrant)
|
|
||||||
sources+=(install_spdk)
|
|
||||||
|
|
||||||
sudo mkdir -p /usr/{,local}/src
|
|
||||||
sudo mkdir -p "$GIT_REPOS"
|
|
||||||
|
|
||||||
for source in "${sources[@]}"; do
|
|
||||||
source_conf=${source^^}
|
|
||||||
if [[ ${!source_conf} == true ]]; then
|
|
||||||
"$source"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $INSTALL_REFSPDK == true ]]; then
|
|
||||||
# Serialize builds as refspdk depends on spdk
|
|
||||||
[[ $INSTALL_SPDK != true ]] && install_spdk
|
|
||||||
install_refspdk latest
|
|
||||||
install_refspdk LTS
|
|
||||||
fi
|
|
||||||
|
@ -165,6 +165,7 @@ if $INSTALL; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
source "$vmsetupdir/pkgdep/git"
|
source "$vmsetupdir/pkgdep/git"
|
||||||
|
install_sources
|
||||||
|
|
||||||
# create autorun-spdk.conf in home folder. This is sourced by the autotest_common.sh file.
|
# create autorun-spdk.conf in home folder. This is sourced by the autotest_common.sh file.
|
||||||
# By setting any one of the values below to 0, you can skip that specific test. If you are
|
# By setting any one of the values below to 0, you can skip that specific test. If you are
|
||||||
|
Loading…
Reference in New Issue
Block a user