xref: /qemu/tests/functional/test_ppc_tuxrun.py (revision a9436dd4077b0ee04dbbd2354a6738654530a206)
1 #!/usr/bin/env python3
2 #
3 # Functional test that boots known good tuxboot images the same way
4 # that tuxrun (www.tuxrun.org) does. This tool is used by things like
5 # the LKFT project to run regression tests on kernels.
6 #
7 # Copyright (c) 2023 Linaro Ltd.
8 #
9 # Author:
10 #  Alex Bennée <alex.bennee@linaro.org>
11 #
12 # SPDX-License-Identifier: GPL-2.0-or-later
13 
14 from qemu_test import Asset
15 from qemu_test.tuxruntest import TuxRunBaselineTest
16 
17 class TuxRunPPC32Test(TuxRunBaselineTest):
18 
19     ASSET_PPC32_KERNEL = Asset(
20         'https://storage.tuxboot.com/20230331/ppc32/uImage',
21         '1a68f74b860fda022fb12e03c5efece8c2b8b590d96cca37a8481a3ae0b3f81f')
22     ASSET_PPC32_ROOTFS = Asset(
23         'https://storage.tuxboot.com/20230331/ppc32/rootfs.ext4.zst',
24         '8885b9d999cc24d679542a02e9b6aaf48f718f2050ece6b8347074b6ee41dd09')
25 
26     def test_ppc32(self):
27         self.set_machine('ppce500')
28         self.cpu='e500mc'
29         self.wait_for_shutdown=False
30         self.common_tuxrun(kernel_asset=self.ASSET_PPC32_KERNEL,
31                            rootfs_asset=self.ASSET_PPC32_ROOTFS,
32                            drive="virtio-blk-pci")
33 
34 if __name__ == '__main__':
35     TuxRunBaselineTest.main()
36