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