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 TuxRunMips64ELTest(TuxRunBaselineTest):
18
19    ASSET_MIPS64EL_KERNEL = Asset(
20        'https://storage.tuxboot.com/20230331/mips64el/vmlinux',
21        'd4e08965e2155c4cccce7c5f34d18fe34c636cda2f2c9844387d614950155266')
22    ASSET_MIPS64EL_ROOTFS = Asset(
23        'https://storage.tuxboot.com/20230331/mips64el/rootfs.ext4.zst',
24        'fba585368f5915b1498ed081863474b2d7ec4e97cdd46d21bdcb2f9698f83de4')
25
26    def test_mips64el(self):
27        self.set_machine('malta')
28        self.root="sda"
29        self.wait_for_shutdown=False
30        self.common_tuxrun(kernel_asset=self.ASSET_MIPS64EL_KERNEL,
31                           rootfs_asset=self.ASSET_MIPS64EL_ROOTFS,
32                           drive="driver=ide-hd,bus=ide.0,unit=0")
33
34if __name__ == '__main__':
35    TuxRunBaselineTest.main()
36