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