Skip to contentSkip to conversation

tests/functional: Skip the screendump tests if the command is not available

PATCH New Thomas Huth 1 participant 2 messages Mar 25, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/functional: Skip the screendump tests if the command is not available

From: Thomas Huth <[email protected]>

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.

---
 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(-)
tests/functional/test_arm_integratorcp.py +4 -2
index a85b339d772..4f00924aa03 100755
@@ -73,8 +73,10 @@ def test_framebuffer_tux_logo(self):
         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
tests/functional/test_m68k_nextcube.py +4 -2
index ff773a7994f..13c72bd136a 100755
@@ -32,8 +32,10 @@ def check_bootrom_framebuffer(self, screenshot_path):
         # 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):
tests/functional/test_mips64el_malta.py +4 -2
index a8da15a26b3..a0bbd847512 100755
@@ -133,8 +133,10 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count):
         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
Signature · 1 line
2.49.0
#1 lore raw

PATCH 1/1 tests/functional: Skip the screendump tests if the command is not available

From: Thomas Huth <[email protected]>

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.

---
 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(-)
tests/functional/test_arm_integratorcp.py +4 -2
index a85b339d772..4f00924aa03 100755
@@ -73,8 +73,10 @@ def test_framebuffer_tux_logo(self):
         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
tests/functional/test_m68k_nextcube.py +4 -2
index ff773a7994f..13c72bd136a 100755
@@ -32,8 +32,10 @@ def check_bootrom_framebuffer(self, screenshot_path):
         # 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):
tests/functional/test_mips64el_malta.py +4 -2
index a8da15a26b3..a0bbd847512 100755
@@ -133,8 +133,10 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count):
         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
Signature · 1 line
2.49.0