13a07875fSThomas Huth#!/usr/bin/env python3 23a07875fSThomas Huth# 33a07875fSThomas Huth# Functional test that boots a Linux kernel on an OpenRISC-1000 SIM machine 43a07875fSThomas Huth# and checks the console 53a07875fSThomas Huth# 63a07875fSThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later 73a07875fSThomas Huth 83a07875fSThomas Huthfrom qemu_test import LinuxKernelTest, Asset 9*5831ed84SDaniel P. Berrangé 103a07875fSThomas Huth 113a07875fSThomas Huthclass OpenRISC1kSimTest(LinuxKernelTest): 123a07875fSThomas Huth 133a07875fSThomas Huth ASSET_DAY20 = Asset( 1467d76bdeSThomas Huth 'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day20.tar.xz', 153a07875fSThomas Huth 'ff9d7dd7c6bdba325bd85ee85c02db61ff653e129558aeffe6aff55bffb6763a') 163a07875fSThomas Huth 173a07875fSThomas Huth def test_or1k_sim(self): 183a07875fSThomas Huth self.set_machine('or1k-sim') 19*5831ed84SDaniel P. Berrangé self.archive_extract(self.ASSET_DAY20) 203a07875fSThomas Huth self.vm.set_console() 21beaf88c8SDaniel P. Berrangé self.vm.add_args('-kernel', self.scratch_file('day20', 'vmlinux')) 223a07875fSThomas Huth self.vm.launch() 233a07875fSThomas Huth self.wait_for_console_pattern('QEMU advent calendar') 243a07875fSThomas Huth 253a07875fSThomas Huthif __name__ == '__main__': 263a07875fSThomas Huth LinuxKernelTest.main() 27