Commit ee191fa8 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

test/vhost: Don't fetch .qcow2 image needed for tests



Simply fail. It's expected to have this image already installed on
the system.

Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Change-Id: Ie7bbde84fe633c8b5a4d41bd6dcbee66d6f4a0c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6375


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 3e4b33ab
Loading
Loading
Loading
Loading
+8 −13
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ VM_DIR=$VHOST_DIR/vms
TARGET_DIR=$VHOST_DIR/vhost
VM_PASSWORD="root"

VM_IMAGE=$HOME/spdk_test_image.qcow2
VM_IMAGE=${VM_IMAGE:-"$HOME/spdk_test_image.qcow2"}

if ! hash $QEMU_IMG_BIN $QEMU_BIN; then
	error 'QEMU is not installed on this system. Unable to run vhost tests.'
@@ -27,22 +27,17 @@ source $rootdir/test/vhost/common/autotest.config
function vhosttestinit() {
	if [ "$TEST_MODE" == "iso" ]; then
		$rootdir/scripts/setup.sh

		# Look for the VM image
		if [[ ! -f $VM_IMAGE ]]; then
			echo "VM image not found at $VM_IMAGE"
			echo "Download to $HOME? [yn]"
			read -r download
			if [ "$download" = "y" ]; then
				curl https://ci.spdk.io/download/test_resources/vhost_vm_image.tar.gz | tar xz -C $HOME
			fi
	fi

	if [[ -e $VM_IMAGE.gz ]]; then
		gzip -dc "$VM_IMAGE.gz" > "$VM_IMAGE"
	fi

	# Look for the VM image
	if [[ "$1" != "--no_vm" ]] && [[ ! -f $VM_IMAGE ]]; then
		error "VM image not found at $VM_IMAGE"
		exit 1
	if [[ ! -f $VM_IMAGE ]]; then
		[[ $1 != "--no_vm" ]] || return 0
		echo "$VM_IMAGE is missing" >&2
		return 1
	fi
}

+1 −7
Original line number Diff line number Diff line
@@ -36,13 +36,7 @@ if [[ $(uname -s) != Linux ]]; then
fi

: ${FIO_BIN="$DEFAULT_FIO_BIN"}

if [[ ! -r "${VM_IMAGE}" ]]; then
	echo ""
	echo "ERROR: VM image '${VM_IMAGE}' does not exist."
	echo ""
	exit 1
fi
vhosttestinit

WORKDIR=$(readlink -f $(dirname $0))

+1 −7
Original line number Diff line number Diff line
@@ -15,13 +15,7 @@ fi
DEFAULT_FIO_BIN="/home/sys_sgsw/fio_ubuntu"

: ${FIO_BIN="$DEFAULT_FIO_BIN"}

if [[ ! -r "${VM_IMAGE}" ]]; then
	echo ""
	echo "ERROR: VM image '${VM_IMAGE}' does not exist."
	echo ""
	exit 1
fi
vhosttestinit

WORKDIR=$(readlink -f $(dirname $0))