1 # Functional tests for the Generic Loongson-3 Platform.
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
13 from avocado import skipUnless
14 from avocado_qemu import QemuSystemTest
15 from avocado_qemu import wait_for_console_pattern
17 class MipsLoongson3v(QemuSystemTest):
20 @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code')
21 def test_pmon_serial_console(self):
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
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')
37 self.vm.add_args('-bios', pmon_path)
39 wait_for_console_pattern(self, 'CPU GODSON3 BogoMIPS:')