From 7e703a59ad1bccc27ca70ce6f2888222068de2fd Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Wed, 15 Sep 2021 12:05:14 +0200 Subject: [PATCH] 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 Change-Id: I8022770d301dc778317f6ada215c31877d058fbd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9513 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Monica Kenguva Reviewed-by: Tomasz Zawadzki Reviewed-by: Karol Latecki Reviewed-by: Ben Walker --- test/common/config/pkgdep/git | 11 +++++++++++ test/common/config/vm_setup.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/test/common/config/pkgdep/git b/test/common/config/pkgdep/git index 5086c0b52..68b459987 100644 --- a/test/common/config/pkgdep/git +++ b/test/common/config/pkgdep/git @@ -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%%.*} diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index 445c702ee..2d771c388 100755 --- a/test/common/config/vm_setup.sh +++ b/test/common/config/vm_setup.sh @@ -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"