mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
tests/functional/aspeed: extract boot and login sequence into helper function
Extracted repeated boot and login steps into a new helper function. No change in functional behavior. 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/20250423072350.541742-10-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
b2a7c02a9a
commit
af93cef791
1 changed files with 7 additions and 5 deletions
|
@ -25,10 +25,15 @@ class AST2x00MachineSDK(QemuSystemTest):
|
||||||
|
|
||||||
self.vm.launch()
|
self.vm.launch()
|
||||||
|
|
||||||
|
def verify_openbmc_boot_and_login(self, name):
|
||||||
wait_for_console_pattern(self, 'U-Boot 2023.10')
|
wait_for_console_pattern(self, 'U-Boot 2023.10')
|
||||||
wait_for_console_pattern(self, '## Loading kernel from FIT Image')
|
wait_for_console_pattern(self, '## Loading kernel from FIT Image')
|
||||||
wait_for_console_pattern(self, 'Starting kernel ...')
|
wait_for_console_pattern(self, 'Starting kernel ...')
|
||||||
|
|
||||||
|
wait_for_console_pattern(self, f'{name} login:')
|
||||||
|
exec_command_and_wait_for_pattern(self, 'root', 'Password:')
|
||||||
|
exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')
|
||||||
|
|
||||||
ASSET_SDK_V906_AST2700 = Asset(
|
ASSET_SDK_V906_AST2700 = Asset(
|
||||||
'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.06/ast2700-a0-default-obmc.tar.gz',
|
'https://github.com/AspeedTech-BMC/openbmc/releases/download/v09.06/ast2700-a0-default-obmc.tar.gz',
|
||||||
'7247b6f19dbfb700686f8d9f723ac23f3eb229226c0589cb9b06b80d1b61f3cb')
|
'7247b6f19dbfb700686f8d9f723ac23f3eb229226c0589cb9b06b80d1b61f3cb')
|
||||||
|
@ -89,16 +94,12 @@ class AST2x00MachineSDK(QemuSystemTest):
|
||||||
self.do_test_aarch64_aspeed_sdk_start(
|
self.do_test_aarch64_aspeed_sdk_start(
|
||||||
self.scratch_file(name, 'image-bmc'))
|
self.scratch_file(name, 'image-bmc'))
|
||||||
|
|
||||||
wait_for_console_pattern(self, f'{name} login:')
|
|
||||||
|
|
||||||
exec_command_and_wait_for_pattern(self, 'root', 'Password:')
|
|
||||||
exec_command_and_wait_for_pattern(self, '0penBmc', f'root@{name}:~#')
|
|
||||||
|
|
||||||
def test_aarch64_ast2700_evb_sdk_v09_06(self):
|
def test_aarch64_ast2700_evb_sdk_v09_06(self):
|
||||||
self.set_machine('ast2700-evb')
|
self.set_machine('ast2700-evb')
|
||||||
|
|
||||||
self.archive_extract(self.ASSET_SDK_V906_AST2700)
|
self.archive_extract(self.ASSET_SDK_V906_AST2700)
|
||||||
self.start_ast2700_test('ast2700-a0-default')
|
self.start_ast2700_test('ast2700-a0-default')
|
||||||
|
self.verify_openbmc_boot_and_login('ast2700-a0-default')
|
||||||
self.do_ast2700_i2c_test()
|
self.do_ast2700_i2c_test()
|
||||||
|
|
||||||
def test_aarch64_ast2700a1_evb_sdk_v09_06(self):
|
def test_aarch64_ast2700a1_evb_sdk_v09_06(self):
|
||||||
|
@ -106,6 +107,7 @@ class AST2x00MachineSDK(QemuSystemTest):
|
||||||
|
|
||||||
self.archive_extract(self.ASSET_SDK_V906_AST2700A1)
|
self.archive_extract(self.ASSET_SDK_V906_AST2700A1)
|
||||||
self.start_ast2700_test('ast2700-default')
|
self.start_ast2700_test('ast2700-default')
|
||||||
|
self.verify_openbmc_boot_and_login('ast2700-default')
|
||||||
self.do_ast2700_i2c_test()
|
self.do_ast2700_i2c_test()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue