pkgdep/git: Add install support for lcov

This is targeted mainly for centos7 where newer devtoolset is meant
to be used and with which the shipped version of lcov is not
compatible.

Considering the above, don't add lcov to the default installation
list, keep it on-demand.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I8022770d301dc778317f6ada215c31877d058fbd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9513
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Michal Berger 2021-09-15 12:05:14 +02:00 committed by Tomasz Zawadzki
parent e08096ac78
commit 7e703a59ad
2 changed files with 12 additions and 1 deletions

View File

@ -489,6 +489,14 @@ function install_ice() {
)
}
function install_lcov() {
local lcov_version=v1.15
rm -rf /usr/src/lcov
sudo git clone "$GIT_REPO_LCOV" --branch "$lcov_version" /usr/src/lcov
(cd /usr/src/lcov; sudo make install)
}
function install_sources() {
if [[ $ID == centos ]] && (( VERSION_ID == 7 )); then
# install proper version of the git first
@ -514,6 +522,7 @@ function install_sources() {
install_qemu
install_igb_uio
install_ice
install_lcov
)
install_extra_pkgs
fi
@ -576,6 +585,8 @@ export GIT_REPO_DPDK_KMODS
export IRDMA_DRIVER
: ${ICE_DRIVER="https://sourceforge.net/projects/e1000/files/ice stable/$ICE_VERSION/ice-$ICE_VERSION.tar.gz"}
export ICE_DRIVER
: ${GIT_REPO_LCOV=https://github.com/linux-test-project/lcov}
export GIT_REPO_LCOV
GIT_REPOS=${GIT_REPOS:-$HOME}
gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}

View File

@ -44,7 +44,7 @@ function usage() {
echo " -h --help"
echo " -u --upgrade Run $package_manager upgrade"
echo " -i --install-deps Install $package_manager based dependencies"
echo " -t --test-conf List of test configurations to enable (${CONF},irdma)"
echo " -t --test-conf List of test configurations to enable (${CONF},irdma,lcov)"
echo " -c --conf-path Path to configuration file"
echo " -d --dir-git Path to where git sources should be saved"
echo " -s --disable-tsocks Disable use of tsocks"