Add a new functional test for the ast1040-evb machine to validate Zephyr firmware boot flow in QEMU.
Signed-off-by: Jamin Lin <[email protected]> --- tests/functional/arm/meson.build | 1 + tests/functional/arm/test_aspeed_ast1040.py | 35 +++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/functional/arm/test_aspeed_ast1040.py diff --git a/tests/functional/arm/meson.build b/tests/functional/arm/meson.build index 2f538f29a2..786b4b2985 100644 --- a/tests/functional/arm/meson.build +++ b/tests/functional/arm/meson.build @@ -33,6 +33,7 @@ tests_arm_system_quick = [ tests_arm_system_thorough = [ 'aspeed_ast1030', + 'aspeed_ast1040', 'aspeed_ast1060', 'aspeed_palmetto', 'aspeed_romulus', diff --git a/tests/functional/arm/test_aspeed_ast1040.py b/tests/functional/arm/test_aspeed_ast1040.py new file mode 100644 index 0000000000..e4d8ecb37a --- /dev/null +++ b/tests/functional/arm/test_aspeed_ast1040.py @@ -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() -- 2.43.0
