Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / tests / avocado / machine_arm_canona1100.py
bloba42d8b0f2b02f12bacc729af07a55242a76e7047
1 # Functional test that boots the canon-a1100 machine with firmware
3 # Copyright (c) 2020 Red Hat, Inc.
5 # Author:
6 # Thomas Huth <thuth@redhat.com>
8 # This work is licensed under the terms of the GNU GPL, version 2 or
9 # later. See the COPYING file in the top-level directory.
11 from avocado_qemu import QemuSystemTest
12 from avocado_qemu import wait_for_console_pattern
13 from avocado.utils import archive
15 class CanonA1100Machine(QemuSystemTest):
16 """Boots the barebox firmware and checks that the console is operational"""
18 timeout = 90
20 def test_arm_canona1100(self):
21 """
22 :avocado: tags=arch:arm
23 :avocado: tags=machine:canon-a1100
24 :avocado: tags=device:pflash_cfi02
25 """
26 tar_url = ('https://qemu-advcal.gitlab.io'
27 '/qac-best-of-multiarch/download/day18.tar.xz')
28 tar_hash = '068b5fc4242b29381acee94713509f8a876e9db6'
29 file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
30 archive.extract(file_path, self.workdir)
31 self.vm.set_console()
32 self.vm.add_args('-bios',
33 self.workdir + '/day18/barebox.canon-a1100.bin')
34 self.vm.launch()
35 wait_for_console_pattern(self, 'running /env/bin/init')