tests/functional: skip vulkan tests when not configured
PATCH 1/1 tests/functional: skip vulkan tests when not configured
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 <[email protected]>
--- tests/functional/test_aarch64_virt_gpu.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
tests/functional/test_aarch64_virt_gpu.py +7 -3
@@ -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")
Signature · 1 line
2.39.5