diff options
| author | Cédric Le Goater <clg@redhat.com> | 2024-12-06 14:11:29 +0100 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2024-12-11 07:25:53 +0100 |
| commit | 08743dbaa12e0e3c1622bfcdd6cbb7eb03d51ffb (patch) | |
| tree | 637370b973c1315116c1ba463d2780d381fc9682 /tests/functional/aspeed.py | |
| parent | 5f2b9738b281894d3fdc0affbdcada2f8c0cc19e (diff) | |
| download | focaccia-qemu-08743dbaa12e0e3c1622bfcdd6cbb7eb03d51ffb.tar.gz focaccia-qemu-08743dbaa12e0e3c1622bfcdd6cbb7eb03d51ffb.zip | |
tests/functional: Introduce a specific test for ast2500 SoC
This moves the ast2500-evb tests to a new test file and extends the aspeed module with routines used to run the buildroot and sdk tests. No changes in the test. Reviewed-by: Thomas Huth <thuth@redhat.com> Link: https://lore.kernel.org/r/20241206131132.520911-5-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'tests/functional/aspeed.py')
| -rw-r--r-- | tests/functional/aspeed.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/functional/aspeed.py b/tests/functional/aspeed.py index d4dc5320b9..62f50bab7a 100644 --- a/tests/functional/aspeed.py +++ b/tests/functional/aspeed.py @@ -2,6 +2,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later +from qemu_test import exec_command_and_wait_for_pattern from qemu_test import LinuxKernelTest class AspeedTest(LinuxKernelTest): @@ -21,3 +22,35 @@ class AspeedTest(LinuxKernelTest): "aspeed-smc 1e620000.spi: read control register: 203b0641") self.wait_for_console_pattern("ftgmac100 1e660000.ethernet eth0: irq ") self.wait_for_console_pattern("systemd[1]: Set hostname to") + + def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'): + self.require_netdev('user') + self.vm.set_console() + self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw,read-only=true', + '-net', 'nic', '-net', 'user') + self.vm.launch() + + self.wait_for_console_pattern('U-Boot 2019.04') + self.wait_for_console_pattern('## Loading kernel from FIT Image') + self.wait_for_console_pattern('Starting kernel ...') + self.wait_for_console_pattern('Booting Linux on physical CPU ' + cpu_id) + self.wait_for_console_pattern('lease of 10.0.2.15') + # the line before login: + self.wait_for_console_pattern(pattern) + exec_command_and_wait_for_pattern(self, 'root', 'Password:') + exec_command_and_wait_for_pattern(self, 'passw0rd', '#') + + def do_test_arm_aspeed_buildroot_poweroff(self): + exec_command_and_wait_for_pattern(self, 'poweroff', + 'reboot: System halted'); + + def do_test_arm_aspeed_sdk_start(self, image): + self.require_netdev('user') + self.vm.set_console() + self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', + '-net', 'nic', '-net', 'user', '-snapshot') + self.vm.launch() + + self.wait_for_console_pattern('U-Boot 2019.04') + self.wait_for_console_pattern('## Loading kernel from FIT Image') + self.wait_for_console_pattern('Starting kernel ...') |