master
py 38 lines 1.23 KB
Raw
1 #!/usr/bin/env python3
2 #
3 # CD boot test for HPPA machines
4 #
5 # SPDX-License-Identifier: GPL-2.0-or-later
6
7 from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pattern
8 from qemu_test import wait_for_console_pattern
9
10
11 class HppaCdBoot(QemuSystemTest):
12
13 ASSET_CD = Asset(
14 ('https://github.com/philmd/qemu-testing-blob/raw/ec1b741/'
15 'hppa/hp9000/712/C7120023.frm'),
16 '32c612ad2074516986bdc27768903c561fa92af2ca48e5ac3f3359ade1c42f70')
17
18 def test_cdboot(self):
19 self.set_machine('B160L')
20 cdrom_path = self.ASSET_CD.fetch()
21
22 self.vm.set_console()
23 self.vm.add_args('-cdrom', cdrom_path,
24 '-boot', 'd',
25 '-no-reboot')
26 self.vm.launch()
27 wait_for_console_pattern(self, 'Unrecognized MODEL TYPE = 502')
28 wait_for_console_pattern(self, 'UPDATE PAUSED>')
29
30 exec_command_and_wait_for_pattern(self, 'exit\r', 'UPDATE>')
31 exec_command_and_wait_for_pattern(self, 'ls\r', 'IMAGE1B')
32 wait_for_console_pattern(self, 'UPDATE>')
33 exec_command_and_wait_for_pattern(self, 'exit\r',
34 'THIS UTILITY WILL NOW RESET THE SYSTEM.....')
35
36
37 if __name__ == '__main__':
38 QemuSystemTest.main()