2024-08-30 16:38:13 +03:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
#
|
2020-05-14 22:04:22 +03:00
|
|
|
# Functional test that boots the canon-a1100 machine with firmware
|
|
|
|
#
|
|
|
|
# Copyright (c) 2020 Red Hat, Inc.
|
|
|
|
#
|
|
|
|
# Author:
|
|
|
|
# Thomas Huth <thuth@redhat.com>
|
|
|
|
#
|
|
|
|
# This work is licensed under the terms of the GNU GPL, version 2 or
|
|
|
|
# later. See the COPYING file in the top-level directory.
|
|
|
|
|
2024-08-30 16:38:13 +03:00
|
|
|
from qemu_test import QemuSystemTest, Asset
|
|
|
|
from qemu_test import wait_for_console_pattern
|
|
|
|
from qemu_test.utils import archive_extract
|
2020-05-14 22:04:22 +03:00
|
|
|
|
2021-09-27 19:14:33 +03:00
|
|
|
class CanonA1100Machine(QemuSystemTest):
|
2020-05-14 22:04:22 +03:00
|
|
|
"""Boots the barebox firmware and checks that the console is operational"""
|
|
|
|
|
|
|
|
timeout = 90
|
|
|
|
|
2024-08-30 16:38:13 +03:00
|
|
|
ASSET_BIOS = Asset(('https://qemu-advcal.gitlab.io'
|
|
|
|
'/qac-best-of-multiarch/download/day18.tar.xz'),
|
|
|
|
'28e71874ce985be66b7fd1345ed88cb2523b982f899c8d2900d6353054a1be49')
|
|
|
|
|
2020-05-14 22:04:22 +03:00
|
|
|
def test_arm_canona1100(self):
|
2024-08-30 16:38:13 +03:00
|
|
|
self.set_machine('canon-a1100')
|
|
|
|
|
|
|
|
file_path = self.ASSET_BIOS.fetch()
|
|
|
|
archive_extract(file_path, dest_dir=self.workdir,
|
|
|
|
member="day18/barebox.canon-a1100.bin")
|
2020-05-14 22:04:22 +03:00
|
|
|
self.vm.set_console()
|
|
|
|
self.vm.add_args('-bios',
|
|
|
|
self.workdir + '/day18/barebox.canon-a1100.bin')
|
|
|
|
self.vm.launch()
|
|
|
|
wait_for_console_pattern(self, 'running /env/bin/init')
|
2024-08-30 16:38:13 +03:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
QemuSystemTest.main()
|