tests/avocado: Add a test for a little-endian microblaze machine
[qemu/ar7.git] / tests / avocado / machine_mips_loongson3v.py
blob5194cf18c9c7eb0c027ded615154424c8f6fbabc
1 # Functional tests for the Generic Loongson-3 Platform.
3 # Copyright (c) 2021 Jiaxun Yang <jiaxun.yang@flygoat.com>
5 # This work is licensed under the terms of the GNU GPL, version 2 or later.
6 # See the COPYING file in the top-level directory.
8 # SPDX-License-Identifier: GPL-2.0-or-later
10 import os
11 import time
13 from avocado import skipUnless
14 from avocado_qemu import QemuSystemTest
15 from avocado_qemu import wait_for_console_pattern
17 class MipsLoongson3v(QemuSystemTest):
18 timeout = 60
20 @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code')
21 def test_pmon_serial_console(self):
22 """
23 :avocado: tags=arch:mips64el
24 :avocado: tags=endian:little
25 :avocado: tags=machine:loongson3-virt
26 :avocado: tags=cpu:Loongson-3A1000
27 :avocado: tags=device:liointc
28 :avocado: tags=device:goldfish_rtc
29 """
31 pmon_hash = '7c8b45dd81ccfc55ff28f5aa267a41c3'
32 pmon_path = self.fetch_asset('https://github.com/loongson-community/pmon/'
33 'releases/download/20210112/pmon-3avirt.bin',
34 asset_hash=pmon_hash, algorithm='md5')
36 self.vm.set_console()
37 self.vm.add_args('-bios', pmon_path)
38 self.vm.launch()
39 wait_for_console_pattern(self, 'CPU GODSON3 BogoMIPS:')