Commit 823830c4 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

test/nvme-cli: skip test if nvme-cli not found



No need to run the stub and other setup work if the nvme-cli repository
is not found on the test agent.

Change-Id: I5a3c0ab8ceb25e65f4693b8fc519812ebccf9ae7
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402380


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 8887697f
Loading
Loading
Loading
Loading
+27 −25
Original line number Diff line number Diff line
@@ -8,6 +8,11 @@ source $rootdir/scripts/common.sh
source $rootdir/test/common/autotest_common.sh
spdk_nvme_cli="/home/sys_sgsw/nvme-cli"

if [ ! -d $spdk_nvme_cli ]; then
	echo "nvme-cli repository not found at $spdk_nvme_cli; skipping tests."
	exit 0
fi

timing_enter nvme_cli

if [ `uname` = Linux ]; then
@@ -15,7 +20,6 @@ if [ `uname` = Linux ]; then
	trap "kill_stub; exit 1" SIGINT SIGTERM EXIT
fi

if [ -d $spdk_nvme_cli ]; then
# Build against the version of SPDK under test
rm -f "$spdk_nvme_cli/spdk"
ln -sf "$rootdir" "$spdk_nvme_cli/spdk"
@@ -38,8 +42,6 @@ if [ -d $spdk_nvme_cli ]; then
./nvme get-feature $bdf -n 1 -f 1 -s 1 -l 100
./nvme get-log $bdf -n 1 -i 1 -l 100
./nvme reset $bdf
fi

if [ `uname` = Linux ]; then
	trap - SIGINT SIGTERM EXIT
	kill_stub