From 87f7b8a60b8c194bd33c68cf464fa93e0c7cc891 Mon Sep 17 00:00:00 2001 From: Pavel Abramov Date: Fri, 3 Nov 2023 16:07:02 +0100 Subject: [PATCH] Run VNC test without hardware accelaration This closes #902 Signed-off-by: Pavel Abramov --- tests/vnc/testdata/vnc_test.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/vnc/testdata/vnc_test.txt b/tests/vnc/testdata/vnc_test.txt index 1136eec68..b25bf7161 100644 --- a/tests/vnc/testdata/vnc_test.txt +++ b/tests/vnc/testdata/vnc_test.txt @@ -1,3 +1,7 @@ +exec -t 2m bash check_vm_support.sh +source .env +[!env:with_hw_virt] skip 'Missing HW-assisted virtualization capability' + {{$test_opts := "-test.v -name vnc-app"}} # Starting of reboot detector with a 1 reboot limit @@ -19,6 +23,23 @@ stdout '--- PASS: TestAppLogs' test eden.vnc.test {{$test_opts}} -timewait 10m -test.run TestVNCVMDelete stdout '--- PASS: TestVNCVMDelete' +-- check_vm_support.sh -- +#!/bin/sh + +EDEN={{EdenConfig "eden.root"}}/{{EdenConfig "eden.bin-dist"}}/{{EdenConfig "eden.eden-bin"}} + +:>.env +while true; +do + virt=$($EDEN info --out InfoContent.dinfo.Capabilities.HWAssistedVirtualization | tail -n 1) + if [ -z "$virt" ]; then + sleep 3 + continue + fi + [ "$virt" == "true" ] && echo "with_hw_virt=true" >>.env + break +done + # Test's config. file -- eden-config.yml -- test: