From 4290d218f6bdeba31bde8eab27a800d06baebd98 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Tue, 2 Jun 2020 11:02:28 +0200 Subject: [PATCH] vm_setup: Don't perform checkout directly in spdk repo Perform it inside the a copy instead. Also, don't copy the repo if target directory already exists. Change-Id: Icdff80c978c7a8998b113db27bf744503bb29d0f Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2737 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris Reviewed-by: Karol Latecki Reviewed-by: Tomasz Zawadzki --- test/common/config/pkgdep/git | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/common/config/pkgdep/git b/test/common/config/pkgdep/git index 3575477b0..c1da1ef86 100644 --- a/test/common/config/pkgdep/git +++ b/test/common/config/pkgdep/git @@ -7,11 +7,14 @@ function install_refspdk() { # Create a reference SPDK build for ABI tests git -C spdk_repo/spdk fetch --tags last_release=$(git -C spdk_repo/spdk tag | sort --version-sort | grep -v rc | tail -n1) - git -C spdk_repo/spdk checkout $last_release - git -C spdk_repo/spdk submodule update --init output_dir="$HOME/spdk_$(tr . _ < <(tr -d '[:alpha:]' <<< $last_release))" - cp -r spdk_repo/spdk $output_dir + if [[ ! -d $output_dir ]]; then + cp -r spdk_repo/spdk "$output_dir" + fi + + git -C "$output_dir" checkout "$last_release" + git -C "$output_dir" submodule update --init cat > $HOME/autorun-spdk.conf <<- EOF SPDK_BUILD_SHARED_OBJECT=1