1*87cab1aeSThomas Huth#!/usr/bin/env python3 2*87cab1aeSThomas Huth# 3*87cab1aeSThomas Huth# Functional test that boots known good tuxboot images the same way 4*87cab1aeSThomas Huth# that tuxrun (www.tuxrun.org) does. This tool is used by things like 5*87cab1aeSThomas Huth# the LKFT project to run regression tests on kernels. 6*87cab1aeSThomas Huth# 7*87cab1aeSThomas Huth# Copyright (c) 2023 Linaro Ltd. 8*87cab1aeSThomas Huth# 9*87cab1aeSThomas Huth# Author: 10*87cab1aeSThomas Huth# Alex Bennée <alex.bennee@linaro.org> 11*87cab1aeSThomas Huth# 12*87cab1aeSThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later 13*87cab1aeSThomas Huth 14*87cab1aeSThomas Huthfrom qemu_test import Asset 15*87cab1aeSThomas Huthfrom qemu_test.tuxruntest import TuxRunBaselineTest 16*87cab1aeSThomas Huth 17*87cab1aeSThomas Huthclass TuxRunMipsTest(TuxRunBaselineTest): 18*87cab1aeSThomas Huth 19*87cab1aeSThomas Huth ASSET_MIPS_KERNEL = Asset( 20*87cab1aeSThomas Huth 'https://storage.tuxboot.com/20230331/mips32/vmlinux', 21*87cab1aeSThomas Huth 'bfd2172f8b17fb32970ca0c8c58f59c5a4ca38aa5855d920be3a69b5d16e52f0') 22*87cab1aeSThomas Huth ASSET_MIPS_ROOTFS = Asset( 23*87cab1aeSThomas Huth 'https://storage.tuxboot.com/20230331/mips32/rootfs.ext4.zst', 24*87cab1aeSThomas Huth 'fc3da0b4c2f38d74c6d705123bb0f633c76ed953128f9d0859378c328a6d11a0') 25*87cab1aeSThomas Huth 26*87cab1aeSThomas Huth def test_mips32(self): 27*87cab1aeSThomas Huth self.set_machine('malta') 28*87cab1aeSThomas Huth self.cpu="mips32r6-generic" 29*87cab1aeSThomas Huth self.root="sda" 30*87cab1aeSThomas Huth self.wait_for_shutdown=False 31*87cab1aeSThomas Huth self.common_tuxrun(kernel_asset=self.ASSET_MIPS_KERNEL, 32*87cab1aeSThomas Huth rootfs_asset=self.ASSET_MIPS_ROOTFS, 33*87cab1aeSThomas Huth drive="driver=ide-hd,bus=ide.0,unit=0") 34*87cab1aeSThomas Huth 35*87cab1aeSThomas Huthif __name__ == '__main__': 36*87cab1aeSThomas Huth TuxRunBaselineTest.main() 37