test/vhost: Automatically download VM image in iso mode

Change-Id: If95a5c464169c4027ac3827ccd7325e56fed9281
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458596
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Ben Walker 2019-06-03 15:24:27 -07:00
parent 88da8a91f9
commit 123ccd10a9

View File

@ -24,7 +24,22 @@ function vhosttestinit()
{ {
if [ "$TEST_MODE" == "iso" ]; then if [ "$TEST_MODE" == "iso" ]; then
$rootdir/scripts/setup.sh $rootdir/scripts/setup.sh
# TODO: Test for VM image in correct spot
# Look for the VM image
if [[ ! -f $VM_IMAGE ]]; then
echo "VM image not found at $VM_IMAGE"
echo "Download to $HOME? [yn]"
read download
if [ "$download" = "y" ]; then
curl https://dqtibwqq6s6ux.cloudfront.net/download/test_resources/vhost_vm_image.tar.gz | tar xz -C $HOME
fi
fi
fi
# Look for the VM image
if [[ ! -f $VM_IMAGE ]]; then
error "VM image not found at $VM_IMAGE"
exit 1
fi fi
} }