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