scripts: check if /dev/{mshv,kvm} exists before test run

Right now integration test fails during the test run if
/dev/mshv or /dev/kvm does not exist. We should not
progress and exit early if not present.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam 2023-01-25 16:58:41 -08:00 committed by Rob Bradford
parent 1ce1fe7334
commit e436b382cc

View File

@ -379,6 +379,10 @@ cmd_tests() {
exported_device="/dev/mshv"
fi
if [ ! -e "${exported_device}" ] ; then
die "${exported_device} does not exist on the system"
fi
set -- '--hypervisor' "$hypervisor" "$@"
ensure_build_dir