1*77bc76c7SThomas Huth#!/usr/bin/env python3 2*77bc76c7SThomas Huth# 3*77bc76c7SThomas Huth# Functional test that boots known good tuxboot images the same way 4*77bc76c7SThomas Huth# that tuxrun (www.tuxrun.org) does. This tool is used by things like 5*77bc76c7SThomas Huth# the LKFT project to run regression tests on kernels. 6*77bc76c7SThomas Huth# 7*77bc76c7SThomas Huth# Copyright (c) 2023 Linaro Ltd. 8*77bc76c7SThomas Huth# 9*77bc76c7SThomas Huth# Author: 10*77bc76c7SThomas Huth# Alex Bennée <alex.bennee@linaro.org> 11*77bc76c7SThomas Huth# 12*77bc76c7SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later 13*77bc76c7SThomas Huth 14*77bc76c7SThomas Huthfrom qemu_test import Asset 15*77bc76c7SThomas Huthfrom qemu_test.tuxruntest import TuxRunBaselineTest 16*77bc76c7SThomas Huth 17*77bc76c7SThomas Huthclass TuxRunRiscV32Test(TuxRunBaselineTest): 18*77bc76c7SThomas Huth 19*77bc76c7SThomas Huth ASSET_RISCV32_KERNEL = Asset( 20*77bc76c7SThomas Huth 'https://storage.tuxboot.com/20230331/riscv32/Image', 21*77bc76c7SThomas Huth '89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5') 22*77bc76c7SThomas Huth ASSET_RISCV32_ROOTFS = Asset( 23*77bc76c7SThomas Huth 'https://storage.tuxboot.com/20230331/riscv32/rootfs.ext4.zst', 24*77bc76c7SThomas Huth '7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba') 25*77bc76c7SThomas Huth 26*77bc76c7SThomas Huth def test_riscv32(self): 27*77bc76c7SThomas Huth self.set_machine('virt') 28*77bc76c7SThomas Huth self.common_tuxrun(kernel_asset=self.ASSET_RISCV32_KERNEL, 29*77bc76c7SThomas Huth rootfs_asset=self.ASSET_RISCV32_ROOTFS) 30*77bc76c7SThomas Huth 31*77bc76c7SThomas Huth def test_riscv32_maxcpu(self): 32*77bc76c7SThomas Huth self.set_machine('virt') 33*77bc76c7SThomas Huth self.cpu='max' 34*77bc76c7SThomas Huth self.common_tuxrun(kernel_asset=self.ASSET_RISCV32_KERNEL, 35*77bc76c7SThomas Huth rootfs_asset=self.ASSET_RISCV32_ROOTFS) 36*77bc76c7SThomas Huth 37*77bc76c7SThomas Huthif __name__ == '__main__': 38*77bc76c7SThomas Huth TuxRunBaselineTest.main() 39