xref: /qemu/tests/functional/test_m68k_mcf5208evb.py (revision beaf88c895a5eda649777757c80ab4171de777ff)
19f989d65SThomas Huth#!/usr/bin/env python3
29f989d65SThomas Huth#
39f989d65SThomas Huth# Functional test that boots a Linux kernel on an MCF5208EVB machine
49f989d65SThomas Huth# and checks the console
59f989d65SThomas Huth#
69f989d65SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later
79f989d65SThomas Huth
89f989d65SThomas Huthfrom qemu_test import LinuxKernelTest, Asset
99f989d65SThomas Huthfrom qemu_test.utils import archive_extract
109f989d65SThomas Huth
119f989d65SThomas Huthclass Mcf5208EvbTest(LinuxKernelTest):
129f989d65SThomas Huth
139f989d65SThomas Huth    ASSET_DAY07 = Asset(
1467d76bdeSThomas Huth        'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day07.tar.xz',
159f989d65SThomas Huth        '753c2f3837126b7c6ba92d0b1e0b156e8a2c5131d2d576bb0b9a763fae73c08a')
169f989d65SThomas Huth
179f989d65SThomas Huth    def test_m68k_mcf5208evb(self):
189f989d65SThomas Huth        self.set_machine('mcf5208evb')
199f989d65SThomas Huth        file_path = self.ASSET_DAY07.fetch()
209f989d65SThomas Huth        archive_extract(file_path, self.workdir)
219f989d65SThomas Huth        self.vm.set_console()
22*beaf88c8SDaniel P. Berrangé        self.vm.add_args('-kernel',
23*beaf88c8SDaniel P. Berrangé                         self.scratch_file('day07', 'sanity-clause.elf'))
249f989d65SThomas Huth        self.vm.launch()
259f989d65SThomas Huth        self.wait_for_console_pattern('QEMU advent calendar')
269f989d65SThomas Huth
279f989d65SThomas Huthif __name__ == '__main__':
289f989d65SThomas Huth    LinuxKernelTest.main()
29