From c23d3339ce8fc936d8c60a023ea2b052d847dc78 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 25 Mar 2025 09:17:13 +0100 Subject: [PATCH] tests/functional: Skip the screendump tests if the command is not available It is possible nowadays to compile QEMU without pixman support - in that case the screendump command is not available and the related tests fail. Thus skip these tests if the screendump command could not be executed. Signed-off-by: Thomas Huth Message-ID: <20250325081713.283490-2-thuth@redhat.com> --- tests/functional/test_arm_integratorcp.py | 6 ++++-- tests/functional/test_m68k_nextcube.py | 6 ++++-- tests/functional/test_mips64el_malta.py | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/functional/test_arm_integratorcp.py b/tests/functional/test_arm_integratorcp.py index a85b339d77..4f00924aa0 100755 --- a/tests/functional/test_arm_integratorcp.py +++ b/tests/functional/test_arm_integratorcp.py @@ -73,8 +73,10 @@ class IntegratorMachine(QemuSystemTest): framebuffer_ready = 'Console: switching to colour frame buffer device' wait_for_console_pattern(self, framebuffer_ready) self.vm.cmd('human-monitor-command', command_line='stop') - self.vm.cmd('human-monitor-command', - command_line='screendump %s' % screendump_path) + res = self.vm.cmd('human-monitor-command', + command_line='screendump %s' % screendump_path) + if 'unknown command' in res: + self.skipTest('screendump not available') logger = logging.getLogger('framebuffer') cpu_count = 1 diff --git a/tests/functional/test_m68k_nextcube.py b/tests/functional/test_m68k_nextcube.py index ff773a7994..13c72bd136 100755 --- a/tests/functional/test_m68k_nextcube.py +++ b/tests/functional/test_m68k_nextcube.py @@ -32,8 +32,10 @@ class NextCubeMachine(QemuSystemTest): # TODO: wait for the 'displaysurface_create 1120x832' trace-event. time.sleep(2) - self.vm.cmd('human-monitor-command', - command_line='screendump %s' % screenshot_path) + res = self.vm.cmd('human-monitor-command', + command_line='screendump %s' % screenshot_path) + if 'unknown command' in res: + self.skipTest('screendump not available') @skipIfMissingImports("PIL") def test_bootrom_framebuffer_size(self): diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/test_mips64el_malta.py index dd37212f9d..3cc79b74c1 100755 --- a/tests/functional/test_mips64el_malta.py +++ b/tests/functional/test_mips64el_malta.py @@ -155,8 +155,10 @@ class MaltaMachineFramebuffer(LinuxKernelTest): framebuffer_ready = 'Console: switching to colour frame buffer device' self.wait_for_console_pattern(framebuffer_ready) self.vm.cmd('human-monitor-command', command_line='stop') - self.vm.cmd('human-monitor-command', - command_line='screendump %s' % screendump_path) + res = self.vm.cmd('human-monitor-command', + command_line='screendump %s' % screendump_path) + if 'unknown command' in res: + self.skipTest('screendump not available') logger = logging.getLogger('framebuffer') match_threshold = 0.95 -- 2.39.5