master
py 35 lines 914 Bytes
Raw
1 #!/usr/bin/env python3
2 #
3 # SeaBIOS boot test for HPPA machines
4 #
5 # Copyright (c) 2024 Linaro, Ltd
6 #
7 # SPDX-License-Identifier: GPL-2.0-or-later
8
9 from qemu_test import QemuSystemTest
10 from qemu_test import wait_for_console_pattern
11
12 class HppaSeabios(QemuSystemTest):
13
14 timeout = 5
15 MACH_BITS = {'B160L': 32, 'A400': 64}
16
17 def boot_seabios(self):
18 mach = self.machine
19 bits = self.MACH_BITS[mach]
20 self.vm.add_args('-no-shutdown')
21 self.vm.set_console()
22 self.vm.launch()
23 wait_for_console_pattern(self, f'SeaBIOS PA-RISC {bits}-bit Firmware')
24 wait_for_console_pattern(self, f'Emulated machine: HP {mach} ({bits}-bit')
25
26 def test_hppa_32(self):
27 self.set_machine('B160L')
28 self.boot_seabios()
29
30 def test_hppa_64(self):
31 self.set_machine('A400')
32 self.boot_seabios()
33
34 if __name__ == '__main__':
35 QemuSystemTest.main()