xref: /qemu/tests/functional/test_mipsel_tuxrun.py (revision 513823e7521a09ed7ad1e32e6454bac3b2cbf52d)
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
14from qemu_test import Asset
15from qemu_test.tuxruntest import TuxRunBaselineTest
16
17class TuxRunMipsELTest(TuxRunBaselineTest):
18
19    ASSET_MIPSEL_KERNEL = Asset(
20        'https://storage.tuxboot.com/buildroot/20241119/mips32el/vmlinux',
21        '660dd8c7a6ca7a32d37b4e6348865532ab0edb66802e8cc07869338444cf4929')
22    ASSET_MIPSEL_ROOTFS = Asset(
23        'https://storage.tuxboot.com/buildroot/20241119/mips32el/rootfs.ext4.zst',
24        'c5d69542bcaed54a4f34671671eb4be5c608ee02671d4d0436544367816a73b1')
25
26    def test_mips32el(self):
27        self.set_machine('malta')
28        self.cpu="mips32r6-generic"
29        self.root="sda"
30        self.wait_for_shutdown=False
31        self.common_tuxrun(kernel_asset=self.ASSET_MIPSEL_KERNEL,
32                           rootfs_asset=self.ASSET_MIPSEL_ROOTFS,
33                           drive="driver=ide-hd,bus=ide.0,unit=0")
34
35if __name__ == '__main__':
36    TuxRunBaselineTest.main()
37