mirror of
https://github.com/qemu/qemu.git
synced 2024-12-04 01:03:38 +08:00
2283b627bc
To run user-mode emulation tests, we introduced the avocado_qemu.QemuUserTest which inherits from avocado_qemu.QemuBaseTest. System-mode emulation tests are based on the avocado_qemu.Test class, which also inherits avocado_qemu.QemuBaseTest. To avoid confusion, rename it as avocado_qemu.QemuSystemTest. Suggested-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20211105143416.148332-7-f4bug@amsat.org>
40 lines
1.3 KiB
Python
40 lines
1.3 KiB
Python
# Functional tests for the Generic Loongson-3 Platform.
|
|
#
|
|
# Copyright (c) 2021 Jiaxun Yang <jiaxun.yang@flygoat.com>
|
|
#
|
|
# This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
# See the COPYING file in the top-level directory.
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
import os
|
|
import time
|
|
|
|
from avocado import skipUnless
|
|
from avocado_qemu import QemuSystemTest
|
|
from avocado_qemu import wait_for_console_pattern
|
|
|
|
class MipsLoongson3v(QemuSystemTest):
|
|
timeout = 60
|
|
|
|
@skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code')
|
|
def test_pmon_serial_console(self):
|
|
"""
|
|
:avocado: tags=arch:mips64el
|
|
:avocado: tags=endian:little
|
|
:avocado: tags=machine:loongson3-virt
|
|
:avocado: tags=cpu:Loongson-3A1000
|
|
:avocado: tags=device:liointc
|
|
:avocado: tags=device:goldfish_rtc
|
|
"""
|
|
|
|
pmon_hash = '7c8b45dd81ccfc55ff28f5aa267a41c3'
|
|
pmon_path = self.fetch_asset('https://github.com/loongson-community/pmon/'
|
|
'releases/download/20210112/pmon-3avirt.bin',
|
|
asset_hash=pmon_hash, algorithm='md5')
|
|
|
|
self.vm.set_console()
|
|
self.vm.add_args('-bios', pmon_path)
|
|
self.vm.launch()
|
|
wait_for_console_pattern(self, 'CPU GODSON3 BogoMIPS:')
|