mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
tests/function/aspeed: Add AST1040 functional test
Add a new functional test for the ast1040-evb machine to validate Zephyr firmware boot flow in QEMU. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-9-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
committed by
Cédric Le Goater
parent
b56af8352b
commit
5f302afc19
@@ -34,6 +34,7 @@ tests_arm_system_quick = [
|
||||
|
||||
tests_arm_system_thorough = [
|
||||
'aspeed_ast1030',
|
||||
'aspeed_ast1040',
|
||||
'aspeed_ast1060',
|
||||
'aspeed_palmetto',
|
||||
'aspeed_romulus',
|
||||
|
||||
35
tests/functional/arm/test_aspeed_ast1040.py
Normal file
35
tests/functional/arm/test_aspeed_ast1040.py
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Functional test that boots the ASPEED SoCs with firmware
|
||||
#
|
||||
# Copyright (C) 2026 ASPEED Technology Inc
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
from aspeed import AspeedTest
|
||||
from qemu_test import Asset, exec_command_and_wait_for_pattern
|
||||
|
||||
|
||||
class AST1040Machine(AspeedTest):
|
||||
|
||||
ASSET_ZEPHYR_3_07 = Asset(
|
||||
('https://github.com/AspeedTech-BMC'
|
||||
'/zephyr/releases/download/v00.03.07/ast1040-evb-demo.zip'),
|
||||
'b5189797c22c2d732ddc27670c1efdeba821a2747c9c7434f190791125baa121')
|
||||
|
||||
def test_arm_ast1040_zephyros(self):
|
||||
self.set_machine('ast1040-evb')
|
||||
|
||||
kernel_name = "zephyr.bin"
|
||||
kernel_file = self.archive_extract(
|
||||
self.ASSET_ZEPHYR_3_07, member=kernel_name)
|
||||
|
||||
self.vm.set_console()
|
||||
self.vm.add_args('-kernel', kernel_file, '-nographic')
|
||||
self.vm.launch()
|
||||
self.wait_for_console_pattern("uart:~$")
|
||||
exec_command_and_wait_for_pattern(self, "help",
|
||||
"Available commands")
|
||||
|
||||
if __name__ == '__main__':
|
||||
AspeedTest.main()
|
||||
Reference in New Issue
Block a user