test/nvme: recreate spdk/nvmecli git index file

spdk/nvmecli git index happens to be corrupted and
results in a lot of unrelated failures in the CI.
This patch attempts only to mitigate the issue of
unwanted failures by restoring nvmecli repository
to clean state.

Fixes #1496

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ic17bffb0bc5bd3222c9f395fb217d2ffae99ceb3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3415
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Karol Latecki 2020-07-17 08:59:10 +02:00 committed by Tomasz Zawadzki
parent 0b09b65147
commit 9db3245ed8

View File

@ -848,7 +848,12 @@ function nvme_cli_build() {
# Build against the version of SPDK under test # Build against the version of SPDK under test
pushd $spdk_nvme_cli pushd $spdk_nvme_cli
git clean -dfx # Remove and recreate git index in case it became corrupted
if ! git clean -dfx; then
rm -f .git/index
git clean -dfx
git reset --hard
fi
rm -f "$spdk_nvme_cli/spdk" rm -f "$spdk_nvme_cli/spdk"
ln -sf "$rootdir" "$spdk_nvme_cli/spdk" ln -sf "$rootdir" "$spdk_nvme_cli/spdk"