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