diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2024-12-18 20:24:51 -0500 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2024-12-18 20:24:51 -0500 |
| commit | ba182a693fe15a4f6f2a04e8ecb865c2630e5a16 (patch) | |
| tree | 6256215ea27b7d2028fdf212a9b4ba492f1a27fc /tests/functional/test_arm_integratorcp.py | |
| parent | 877fad2a3e1a76fa3f9508b26858c6e659cc728f (diff) | |
| parent | e2d98f257138b83b6a492d1da5847a7fe0930d10 (diff) | |
| download | focaccia-qemu-ba182a693fe15a4f6f2a04e8ecb865c2630e5a16.tar.gz focaccia-qemu-ba182a693fe15a4f6f2a04e8ecb865c2630e5a16.zip | |
Merge tag 'pull-request-2024-12-18' of https://gitlab.com/thuth/qemu into staging
* Lots of functional test improvements (clean-ups, don't fail on temporary download errors, etc.) * Convert some more avocado tests to the functional framework * Disallow building with libnfs v6 due to an API breakage # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmdirOIRHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbU0NRAAke8X0B6OOD+99lY5nc7Hrh7N1m+sw5Lw # TVwIpxdhxU11vgdlCodfdoVJCV1NGVHwkR57lLNr+bdspWDBBwlmUWn0+t2QCXGe # oyQsV+boznsjG9pan6v6DcU/gOu7/7ZydhJi+M8Msf8ah0lcn/otAdC4ZFB93JLh # 6xPnj69y8HomCW+wMyXl7WTjcWX0wQFzweEYY8p7X7p1rtjYyseiZlRjNAvPgTMI # jznZ6v9/qU54xR9RnKdW+0m1Qu06nx26Wz+ZBlvrJS1Llloe23X9+LY1tDD0Xh1D # 9P0v9PuaBWRRF+UjVjl37LMyn9h1aaKFKBoWQiKMbyvOVr4ncobjRgN8r5kdNxDP # FZ/fA1GiX8O3foN9uB9JLKd6Hl49LAqQSPzAneEc3pfQLH3NdAjPxJDbJH5fyMa7 # qVOQC0Bdy8+2kCxFfKbemrwDOFcyq1fVYcADPDZySjMiPnwFJ1Qpni1tXY1PZ+Tl # Q18AsFJanyAAn7L+8R3Yl54983SuR5eXIFxO+Tq9mw1V1V2h+Cm09HGcS8y5bxFG # Xh+jhMsMB98NFLR87W6olwl57gKllSbTYuGtiz9TrbnuT/THhUJ0k/B76L7C9HWE # ZefkFxC5Zy8jrcz3pgarO+19V+eXg5rwGtEngRQrji/3cY5CbK7Jeh5nvZQeASpb # nZ/gJ/gC8Gs= # =SWw6 # -----END PGP SIGNATURE----- # gpg: Signature made Wed 18 Dec 2024 06:07:14 EST # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 'pull-request-2024-12-18' of https://gitlab.com/thuth/qemu: (38 commits) meson.build: Disallow libnfs v6 to fix the broken macOS build tests/functional: Convert the hotplug_cpu avocado test tests/functional: Convert the intel_iommu avocado test tests/functional: Add a helper function for retrieving the hostfwd port tests/functional: Convert the arm virt avocado test tests/functional: Convert the quanta-gsj avocado test MAINTAINERS: add myself as reviewer for functional test suite tests/functional: ignore errors when caching assets, except for 404 tests/functional: skip tests if assets are not available tests/functional: remove now unused 'run_cmd' helper tests/functional: replace 'run_cmd' with subprocess helpers tests/functional: drop back compat imports from utils.py tests/functional: convert tests to new uncompress helper tests/functional: add 'uncompress' to QemuBaseTest tests/functional: add a generalized uncompress helper tests/functional: convert tests to new archive_extract helper tests/functional: add 'archive_extract' to QemuBaseTest tests/functional: add a generalized archive_extract tests/functional: let cpio_extract accept filenames tests/functional: add common deb_extract helper ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/functional/test_arm_integratorcp.py')
| -rwxr-xr-x | tests/functional/test_arm_integratorcp.py | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/tests/functional/test_arm_integratorcp.py b/tests/functional/test_arm_integratorcp.py index 0fe083f661..a85b339d77 100755 --- a/tests/functional/test_arm_integratorcp.py +++ b/tests/functional/test_arm_integratorcp.py @@ -12,25 +12,11 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -import os import logging from qemu_test import QemuSystemTest, Asset from qemu_test import wait_for_console_pattern -from unittest import skipUnless - - -NUMPY_AVAILABLE = True -try: - import numpy as np -except ImportError: - NUMPY_AVAILABLE = False - -CV2_AVAILABLE = True -try: - import cv2 -except ImportError: - CV2_AVAILABLE = False +from qemu_test import skipIfMissingImports, skipUntrustedTest class IntegratorMachine(QemuSystemTest): @@ -63,7 +49,7 @@ class IntegratorMachine(QemuSystemTest): '-append', 'printk.time=0 console=ttyAMA0') self.vm.launch() - @skipUnless(os.getenv('QEMU_TEST_ALLOW_UNTRUSTED_CODE'), 'untrusted code') + @skipUntrustedTest() def test_integratorcp_console(self): """ Boots the Linux kernel and checks that the console is operational @@ -71,14 +57,16 @@ class IntegratorMachine(QemuSystemTest): self.boot_integratorcp() wait_for_console_pattern(self, 'Log in as root') - @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed') - @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed') - @skipUnless(os.getenv('QEMU_TEST_ALLOW_UNTRUSTED_CODE'), 'untrusted code') + @skipIfMissingImports("numpy", "cv2") + @skipUntrustedTest() def test_framebuffer_tux_logo(self): """ Boot Linux and verify the Tux logo is displayed on the framebuffer. """ - screendump_path = os.path.join(self.workdir, "screendump.pbm") + import numpy as np + import cv2 + + screendump_path = self.scratch_file("screendump.pbm") tuxlogo_path = self.ASSET_TUXLOGO.fetch() self.boot_integratorcp() |