Commit c2fdd754 authored by Sebastian Brzezinka's avatar Sebastian Brzezinka Committed by Tomasz Zawadzki
Browse files

pkgdep/git: install SPDK fork of nvme-cli



This patch add installation of custom version of nvme-cli that support
listing spdk devices through spdk plugin. That is required to verify
tests validity.

This is temporally, until patches are present in nvme-cli upstream.

Signed-off-by: default avatarSebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: Idb6f9e4d3430f7347d551ceb9349ed0b77075a28
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19221


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent b08206df
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -173,6 +173,29 @@ function install_nvmecli() {
	fi
}

# This function install version of nvme-cli, that support listing spdk nvme
# devices, should be remove after changes present in nvme-cli upstream.
function install_nvmecli_plugin() {
	rm -rf "$GIT_REPOS/nvme-cli-plugin"

	git clone $GIT_REPO_NVME_CLI "$GIT_REPOS/nvme-cli-plugin"
	git -C "$GIT_REPOS/nvme-cli-plugin" fetch $GIT_REPO_NVME_CLI refs/changes/95/16795/12
	git -C "$GIT_REPOS/nvme-cli-plugin" checkout FETCH_HEAD

	meson setup --force-fallback-for=libnvme \
		"$GIT_REPOS/nvme-cli-plugin/.build" \
		"$GIT_REPOS/nvme-cli-plugin"
	meson compile -C "$GIT_REPOS/nvme-cli-plugin/.build"

	rm -rf /usr/local/src/nvme-cli-plugin
	mv "$GIT_REPOS/nvme-cli-plugin" /usr/local/src/nvme-cli-plugin

	# Make sure binary is available for the plugin tests
	if [[ -e /usr/local/src/nvme-cli-plugin/.build/nvme ]]; then
		sudo ln -s .build/nvme /usr/local/src/nvme-cli-plugin/
	fi
}

function install_libiscsi() {
	# We currently don't make any changes to the libiscsi repository for our tests, but it is possible that we will need
	# to later. Cloning from git is just future proofing the machines.
@@ -439,6 +462,7 @@ function install_sources() {
			install_irdma
			install_libiscsi
			install_nvmecli
			install_nvmecli_plugin
			install_qat
			install_rocksdb
			install_flamegraph
@@ -500,6 +524,8 @@ export GIT_REPO_LCOV
export GIT_REPO_BCC
: ${GIT_REPO_BPFTRACE=https://github.com/iovisor/bpftrace.git}
export GIT_REPO_BPFTRACE
: ${GIT_REPO_NVME_CLI=https://review.spdk.io/gerrit/spdk/nvme-cli}
export GIT_REPO_NVME_CLI

GIT_REPOS=${GIT_REPOS:-$HOME}