xref: /openbmc/qemu/tests/functional/test_i386_tuxrun.py (revision 6f625ce2f21d6a1243065d236298277c56f972d5)
1*4007fc94SThomas Huth#!/usr/bin/env python3
2*4007fc94SThomas Huth#
3*4007fc94SThomas Huth# Functional test that boots known good tuxboot images the same way
4*4007fc94SThomas Huth# that tuxrun (www.tuxrun.org) does. This tool is used by things like
5*4007fc94SThomas Huth# the LKFT project to run regression tests on kernels.
6*4007fc94SThomas Huth#
7*4007fc94SThomas Huth# Copyright (c) 2023 Linaro Ltd.
8*4007fc94SThomas Huth#
9*4007fc94SThomas Huth# Author:
10*4007fc94SThomas Huth#  Alex Bennée <alex.bennee@linaro.org>
11*4007fc94SThomas Huth#
12*4007fc94SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later
13*4007fc94SThomas Huth
14*4007fc94SThomas Huthfrom qemu_test import Asset
15*4007fc94SThomas Huthfrom qemu_test.tuxruntest import TuxRunBaselineTest
16*4007fc94SThomas Huth
17*4007fc94SThomas Huthclass TuxRunI386Test(TuxRunBaselineTest):
18*4007fc94SThomas Huth
19*4007fc94SThomas Huth    ASSET_I386_KERNEL = Asset(
20*4007fc94SThomas Huth        'https://storage.tuxboot.com/20230331/i386/bzImage',
21*4007fc94SThomas Huth        'a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb86e277f1b76ed956')
22*4007fc94SThomas Huth    ASSET_I386_ROOTFS = Asset(
23*4007fc94SThomas Huth        'https://storage.tuxboot.com/20230331/i386/rootfs.ext4.zst',
24*4007fc94SThomas Huth        'f15e66b2bf673a210ec2a4b2e744a80530b36289e04f5388aab812b97f69754a')
25*4007fc94SThomas Huth
26*4007fc94SThomas Huth    def test_i386(self):
27*4007fc94SThomas Huth        self.set_machine('q35')
28*4007fc94SThomas Huth        self.cpu="coreduo"
29*4007fc94SThomas Huth        self.wait_for_shutdown=False
30*4007fc94SThomas Huth        self.common_tuxrun(kernel_asset=self.ASSET_I386_KERNEL,
31*4007fc94SThomas Huth                           rootfs_asset=self.ASSET_I386_ROOTFS,
32*4007fc94SThomas Huth                           drive="virtio-blk-pci")
33*4007fc94SThomas Huth
34*4007fc94SThomas Huthif __name__ == '__main__':
35*4007fc94SThomas Huth    TuxRunBaselineTest.main()
36