xref: /qemu/tests/functional/test_mipsel_tuxrun.py (revision 16476efde81142ea91213be859771042893be3e2)
155716a89SThomas Huth#!/usr/bin/env python3
255716a89SThomas Huth#
355716a89SThomas Huth# Functional test that boots known good tuxboot images the same way
455716a89SThomas Huth# that tuxrun (www.tuxrun.org) does. This tool is used by things like
555716a89SThomas Huth# the LKFT project to run regression tests on kernels.
655716a89SThomas Huth#
755716a89SThomas Huth# Copyright (c) 2023 Linaro Ltd.
855716a89SThomas Huth#
955716a89SThomas Huth# Author:
1055716a89SThomas Huth#  Alex Bennée <alex.bennee@linaro.org>
1155716a89SThomas Huth#
1255716a89SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later
1355716a89SThomas Huth
1455716a89SThomas Huthfrom qemu_test import Asset
1555716a89SThomas Huthfrom qemu_test.tuxruntest import TuxRunBaselineTest
1655716a89SThomas Huth
1755716a89SThomas Huthclass TuxRunMipsELTest(TuxRunBaselineTest):
1855716a89SThomas Huth
1955716a89SThomas Huth    ASSET_MIPSEL_KERNEL = Asset(
20*16476efdSAlex Bennée        'https://storage.tuxboot.com/buildroot/20241119/mips32el/vmlinux',
21*16476efdSAlex Bennée        '660dd8c7a6ca7a32d37b4e6348865532ab0edb66802e8cc07869338444cf4929')
2255716a89SThomas Huth    ASSET_MIPSEL_ROOTFS = Asset(
23*16476efdSAlex Bennée        'https://storage.tuxboot.com/buildroot/20241119/mips32el/rootfs.ext4.zst',
24*16476efdSAlex Bennée        'c5d69542bcaed54a4f34671671eb4be5c608ee02671d4d0436544367816a73b1')
2555716a89SThomas Huth
2655716a89SThomas Huth    def test_mips32el(self):
2755716a89SThomas Huth        self.set_machine('malta')
2855716a89SThomas Huth        self.cpu="mips32r6-generic"
2955716a89SThomas Huth        self.root="sda"
3055716a89SThomas Huth        self.wait_for_shutdown=False
3155716a89SThomas Huth        self.common_tuxrun(kernel_asset=self.ASSET_MIPSEL_KERNEL,
3255716a89SThomas Huth                           rootfs_asset=self.ASSET_MIPSEL_ROOTFS,
3355716a89SThomas Huth                           drive="driver=ide-hd,bus=ide.0,unit=0")
3455716a89SThomas Huth
3555716a89SThomas Huthif __name__ == '__main__':
3655716a89SThomas Huth    TuxRunBaselineTest.main()
37