PIXMAN is required for screendump. Replace test-time check with earlier @skipUnlessConfig check.
Signed-off-by: Marc-André Lureau <[email protected]> --- tests/functional/arm/test_integratorcp.py | 9 ++++----- tests/functional/m68k/test_nextcube.py | 9 ++++----- tests/functional/mips64el/test_malta.py | 10 +++++----- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/tests/functional/arm/test_integratorcp.py b/tests/functional/arm/test_integratorcp.py index 23ae919359d5..f7551ff7cb88 100755 --- a/tests/functional/arm/test_integratorcp.py +++ b/tests/functional/arm/test_integratorcp.py @@ -16,7 +16,7 @@ from qemu_test import QemuSystemTest, Asset from qemu_test import wait_for_console_pattern -from qemu_test import skipIfMissingImports, skipUntrustedTest +from qemu_test import skipIfMissingImports, skipUntrustedTest, skipUnlessConfig class IntegratorMachine(QemuSystemTest): @@ -58,6 +58,7 @@ def test_integratorcp_console(self): wait_for_console_pattern(self, 'Log in as root') @skipIfMissingImports("numpy", "cv2") + @skipUnlessConfig("PIXMAN") @skipUntrustedTest() def test_framebuffer_tux_logo(self): """ @@ -73,10 +74,8 @@ 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') - res = self.vm.cmd('human-monitor-command', - command_line='screendump %s' % screendump_path) - if 'unknown command' in res: - self.skipTest('screendump not available') + self.vm.cmd('human-monitor-command', + command_line='screendump %s' % screendump_path) cpu_count = 1 match_threshold = 0.92 diff --git a/tests/functional/m68k/test_nextcube.py b/tests/functional/m68k/test_nextcube.py index d917cf5424fe..f38f294bad67 100755 --- a/tests/functional/m68k/test_nextcube.py +++ b/tests/functional/m68k/test_nextcube.py @@ -10,10 +10,11 @@ import time from qemu_test import QemuSystemTest, Asset -from qemu_test import skipIfMissingImports, skipIfMissingCommands +from qemu_test import skipIfMissingImports, skipIfMissingCommands, skipUnlessConfig from qemu_test.tesseract import tesseract_ocr +@skipUnlessConfig("PIXMAN") class NextCubeMachine(QemuSystemTest): timeout = 15 @@ -39,10 +40,8 @@ def check_bootrom_framebuffer(self, screenshot_path): break time.sleep(0.1) - res = self.vm.cmd('human-monitor-command', - command_line=f"screendump {screenshot_path}") - if 'unknown command' in res: - self.skipTest('screendump not available') + self.vm.cmd('human-monitor-command', + command_line=f"screendump {screenshot_path}") @skipIfMissingImports("PIL") def test_bootrom_framebuffer_size(self): diff --git a/tests/functional/mips64el/test_malta.py b/tests/functional/mips64el/test_malta.py index 163bbaf5ca36..80fe3424b234 100755 --- a/tests/functional/mips64el/test_malta.py +++ b/tests/functional/mips64el/test_malta.py @@ -13,7 +13,8 @@ from qemu_test import LinuxKernelTest, Asset from qemu_test import exec_command_and_wait_for_pattern -from qemu_test import skipIfMissingImports, skipFlakyTest, skipUntrustedTest +from qemu_test import skipIfMissingImports, skipFlakyTest, skipUntrustedTest, \ + skipUnlessConfig from mips.test_malta import mips_check_wheezy @@ -114,6 +115,7 @@ def test_wheezy(self): @skipIfMissingImports('numpy', 'cv2') +@skipUnlessConfig("PIXMAN") class MaltaMachineFramebuffer(LinuxKernelTest): timeout = 30 @@ -155,10 +157,8 @@ 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') - res = self.vm.cmd('human-monitor-command', - command_line=f'screendump {screendump_path}') - if 'unknown command' in res: - self.skipTest('screendump not available') + self.vm.cmd('human-monitor-command', + command_line=f'screendump {screendump_path}') match_threshold = 0.95 screendump_bgr = cv2.imread(screendump_path, cv2.IMREAD_COLOR) -- 2.55.0.543.g5ebe2ebe4ea8
