master
py 36 lines 1.19 KB
Raw
1 #!/usr/bin/env python3
2 #
3 # Boot Linux kernel on a mac99 and g3beige ppc machine and check the console
4 #
5 # SPDX-License-Identifier: GPL-2.0-or-later
6
7 from qemu_test import LinuxKernelTest, Asset
8
9
10 class MacTest(LinuxKernelTest):
11
12 ASSET_DAY15 = Asset(
13 'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day15.tar.xz',
14 '03e0757c131d2959decf293a3572d3b96c5a53587165bf05ce41b2818a2bccd5')
15
16 def do_day15_test(self):
17 # mac99 also works with kvm_pr but we don't have a reliable way at
18 # the moment (e.g. by looking at /proc/modules) to detect whether
19 # we're running kvm_hv or kvm_pr. For now let's disable this test
20 # if we don't have TCG support.
21 self.require_accelerator("tcg")
22 self.archive_extract(self.ASSET_DAY15)
23 self.vm.add_args('-M', 'graphics=off')
24 self.launch_kernel(self.scratch_file('day15', 'invaders.elf'),
25 wait_for='QEMU advent calendar')
26
27 def test_ppc_g3beige(self):
28 self.set_machine('g3beige')
29 self.do_day15_test()
30
31 def test_ppc_mac99(self):
32 self.set_machine('mac99')
33 self.do_day15_test()
34
35 if __name__ == '__main__':
36 LinuxKernelTest.main()