]>
Commit | Line | Data |
---|---|---|
252fcf36 TH |
1 | # Test that the U-Boot firmware boots on ppc 405 machines and check the console |
2 | # | |
3 | # Copyright (c) 2021 Red Hat, Inc. | |
4 | # | |
5 | # This work is licensed under the terms of the GNU GPL, version 2 or | |
6 | # later. See the COPYING file in the top-level directory. | |
7 | ||
8 | from avocado.utils import archive | |
2283b627 | 9 | from avocado_qemu import QemuSystemTest |
252fcf36 TH |
10 | from avocado_qemu import wait_for_console_pattern |
11 | from avocado_qemu import exec_command_and_wait_for_pattern | |
12 | ||
2283b627 | 13 | class Ppc405Machine(QemuSystemTest): |
252fcf36 TH |
14 | |
15 | timeout = 90 | |
16 | ||
17 | def do_test_ppc405(self): | |
18 | uboot_url = ('https://gitlab.com/huth/u-boot/-/raw/' | |
19 | 'taihu-2021-10-09/u-boot-taihu.bin') | |
20 | uboot_hash = ('3208940e908a5edc7c03eab072c60f0dcfadc2ab'); | |
21 | file_path = self.fetch_asset(uboot_url, asset_hash=uboot_hash) | |
22 | self.vm.set_console(console_index=1) | |
23 | self.vm.add_args('-bios', file_path) | |
24 | self.vm.launch() | |
25 | wait_for_console_pattern(self, 'AMCC PPC405EP Evaluation Board') | |
26 | exec_command_and_wait_for_pattern(self, 'reset', 'AMCC PowerPC 405EP') | |
27 | ||
252fcf36 TH |
28 | def test_ppc_ref405ep(self): |
29 | """ | |
30 | :avocado: tags=arch:ppc | |
31 | :avocado: tags=machine:ref405ep | |
32 | :avocado: tags=cpu:405ep | |
6e73b98a | 33 | :avocado: tags=accel:tcg |
252fcf36 | 34 | """ |
6e73b98a | 35 | self.require_accelerator("tcg") |
252fcf36 | 36 | self.do_test_ppc405() |