Signed-off-by: Bernhard Beschow <[email protected]> --- MAINTAINERS | 1 + tests/functional/arm/meson.build | 1 + tests/functional/arm/test_mcimx7d_sabre.py | 46 ++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 tests/functional/arm/test_mcimx7d_sabre.py
diff --git a/MAINTAINERS b/MAINTAINERS index 7cc9e558f9..866983d8ee 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -932,6 +932,7 @@ F: include/hw/misc/imx7_*.h F: hw/pci-host/designware.c F: include/hw/pci-host/designware.h F: docs/system/arm/mcimx7d-sabre.rst +F: tests/functional/arm/test_mcimx7d_sabre.py MCIMX8MM-EVK / iMX8MM M: Gaurav Sharma <[email protected]> diff --git a/tests/functional/arm/meson.build b/tests/functional/arm/meson.build index 761b371a8d..e49a04ea6a 100644 --- a/tests/functional/arm/meson.build +++ b/tests/functional/arm/meson.build @@ -20,6 +20,7 @@ test_arm_timeouts = { 'bpim2u' : 500, 'collie' : 180, 'cubieboard' : 360, + 'mcimx7d-sabre' : 240, 'orangepi' : 540, 'quanta_gsj' : 240, 'raspi2' : 120, diff --git a/tests/functional/arm/test_mcimx7d_sabre.py b/tests/functional/arm/test_mcimx7d_sabre.py new file mode 100755 index 0000000000..2894b5201f --- /dev/null +++ b/tests/functional/arm/test_mcimx7d_sabre.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset + + +class Mcimx7dSabreMachine(LinuxKernelTest): + + ASSET_KERNEL = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/netboot/vmlinuz'), + '5851e9c61465a26db810796db671c4729e66e81c365b3ebb1a4b7f772737605b') + + ASSET_INITRD = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/netboot/initrd.gz'), + 'fe33f836232a9107716d34dc56d36dea81bab039243a2a42ea6583a50c9b92ca') + + ASSET_DTB = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/device-tree/imx7d-sdb.dtb'), + 'eed45fe3ba682cc814217bc4558551d36c034ec7a7692c4eb6eaf86132baf80c') + + def setUp(self): + super().setUp() + + self.kernel_path = self.ASSET_KERNEL.fetch() + self.initrd_path = self.ASSET_INITRD.fetch() + self.dtb_path = self.ASSET_DTB.fetch() + + def test_console(self): + self.require_accelerator("tcg") + self.set_machine('mcimx7d-sabre') + self.vm.set_console(console_index=0) + self.vm.add_args('-kernel', self.kernel_path, + '-initrd', self.initrd_path, + '-dtb', self.dtb_path) + + self.vm.launch() + self.wait_for_console_pattern('Starting system log daemon:') + +if __name__ == '__main__': + LinuxKernelTest.main() -- 2.55.0
