1#!/usr/bin/env python3
2#
3# Functional test that boots a Linux kernel on an xtensa lx650 machine
4# and checks the console
5#
6# SPDX-License-Identifier: GPL-2.0-or-later
7
8from qemu_test import LinuxKernelTest, Asset
9from qemu_test.utils import archive_extract
10
11class XTensaLX60Test(LinuxKernelTest):
12
13    ASSET_DAY02 = Asset(
14        'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day02.tar.xz',
15        '68ff07f9b3fd3df36d015eb46299ba44748e94bfbb2d5295fddc1a8d4a9fd324')
16
17    def test_xtensa_lx60(self):
18        self.set_machine('lx60')
19        self.cpu = 'dc233c'
20        file_path = self.ASSET_DAY02.fetch()
21        archive_extract(file_path, self.workdir)
22        self.launch_kernel(self.workdir + '/day02/santas-sleigh-ride.elf',
23                           wait_for='QEMU advent calendar')
24
25if __name__ == '__main__':
26    LinuxKernelTest.main()
27