From e436b382cc8dee1d012f9289859bcfb70da58931 Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Wed, 25 Jan 2023 16:58:41 -0800 Subject: [PATCH] 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 --- scripts/dev_cli.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index 264abc167..518d4ee01 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -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