qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/functional: skip vulkan tests when not configured
@ 2025-03-09 17:19 Alex Bennée
  0 siblings, 0 replies; only message in thread
From: Alex Bennée @ 2025-03-09 17:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée

The CI images don't have the vulkan drivers for the non-existent
hardware even if they can't see the DRI devices. Skip the test early
in this case. While at it fix the missing logging which doesn't seem
to like f-strings.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/functional/test_aarch64_virt_gpu.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/functional/test_aarch64_virt_gpu.py b/tests/functional/test_aarch64_virt_gpu.py
index c6f7738e93..f19a47f8b6 100755
--- a/tests/functional/test_aarch64_virt_gpu.py
+++ b/tests/functional/test_aarch64_virt_gpu.py
@@ -18,7 +18,7 @@
 from qemu_test.linuxkernel import LinuxKernelTest
 
 from re import search
-from subprocess import check_output
+from subprocess import check_output, CalledProcessError
 
 class Aarch64VirtGPUMachine(LinuxKernelTest):
 
@@ -75,7 +75,7 @@ def _launch_virt_gpu(self, gpu_device):
             elif "'type' does not accept value 'egl-headless'" in excp.output:
                 self.skipTest("egl-headless support is not available")
             else:
-                self.log.info(f"unhandled launch failure: {excp.output}")
+                self.log.info("unhandled launch failure: %s", excp.output)
                 raise excp
 
         self.wait_for_console_pattern('buildroot login:')
@@ -119,7 +119,11 @@ def test_aarch64_virt_with_vulkan_gpu(self):
 
         self.require_device('virtio-gpu-gl-pci')
 
-        vk_info = check_output(["vulkaninfo", "--summary"], encoding="utf-8")
+        try:
+            vk_info = check_output(["vulkaninfo", "--summary"],
+                                   encoding="utf-8")
+        except CalledProcessError as excp:
+            self.skipTest(f"Miss-configured host Vulkan: {excp.output}")
 
         if search(r"driverID\s+=\s+DRIVER_ID_NVIDIA_PROPRIETARY", vk_info):
             self.skipTest("Test skipped on NVIDIA proprietary driver")
-- 
2.39.5



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-03-09 17:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-09 17:19 [PATCH] tests/functional: skip vulkan tests when not configured Alex Bennée

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).