| 1 | #!/usr/bin/env python3 |
| 2 | # |
| 3 | # Functional test that boots the canon-a1100 machine with firmware |
| 4 | # |
| 5 | # Copyright (c) 2020 Red Hat, Inc. |
| 6 | # |
| 7 | # Author: |
| 8 | # Thomas Huth <thuth@redhat.com> |
| 9 | # |
| 10 | # This work is licensed under the terms of the GNU GPL, version 2 or |
| 11 | # later. See the COPYING file in the top-level directory. |
| 12 | |
| 13 | from qemu_test import QemuSystemTest, Asset |
| 14 | from qemu_test import wait_for_console_pattern |
| 15 | |
| 16 | |
| 17 | class CanonA1100Machine(QemuSystemTest): |
| 18 | """Boots the barebox firmware and checks that the console is operational""" |
| 19 | |
| 20 | timeout = 90 |
| 21 | |
| 22 | ASSET_BIOS = Asset(('https://qemu-advcal.gitlab.io' |
| 23 | '/qac-best-of-multiarch/download/day18.tar.xz'), |
| 24 | '28e71874ce985be66b7fd1345ed88cb2523b982f899c8d2900d6353054a1be49') |
| 25 | |
| 26 | def test_arm_canona1100(self): |
| 27 | self.set_machine('canon-a1100') |
| 28 | |
| 29 | bios = self.archive_extract(self.ASSET_BIOS, |
| 30 | member="day18/barebox.canon-a1100.bin") |
| 31 | self.vm.set_console() |
| 32 | self.vm.add_args('-bios', bios) |
| 33 | self.vm.launch() |
| 34 | wait_for_console_pattern(self, 'running /env/bin/init') |
| 35 | |
| 36 | if __name__ == '__main__': |
| 37 | QemuSystemTest.main() |