From 0ccf1fc36bde7dbee6798c8572b0696a7af7bca5 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Fri, 5 Jun 2020 15:17:14 +0200 Subject: [PATCH] vm_setup: Move gcc version check to git sources In case vm_setup.sh is called on a bare system (e.g. cloud image), it will instantly fail since gcc won't be on board, forcing user to either install it by itself or by running our pkgdep.sh first. Moving this check to pkgdep/git will mitigate similar issues since before it's sourced, an $INSTALL portion of the script will have a chance to run pkgdep.sh on its own (this still depends on user running vm_setup.sh with -i arg, but still ;)). Change-Id: I309ca42e8ea15fd14e416fc85fa0e244de2d8262 Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2785 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris Reviewed-by: Karol Latecki --- test/common/config/pkgdep/git | 1 + test/common/config/vm_setup.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/config/pkgdep/git b/test/common/config/pkgdep/git index c73f9ae52..e4aee3080 100644 --- a/test/common/config/pkgdep/git +++ b/test/common/config/pkgdep/git @@ -300,6 +300,7 @@ export DRIVER_LOCATION_QAT export GIT_REPO_GIT GIT_REPOS=${GIT_REPOS:-$HOME} +gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*} if [[ $ID == centos ]] && (( VERSION_ID == 7 )); then # install proper version of the git first install_git diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index 603f57468..cde8b6c72 100755 --- a/test/common/config/vm_setup.sh +++ b/test/common/config/vm_setup.sh @@ -29,7 +29,6 @@ VM_SETUP_PATH=$(readlink -f ${BASH_SOURCE%/*}) UPGRADE=false INSTALL=false 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 source /etc/os-release