summaryrefslogtreecommitdiffstats
path: root/tests/avocado/machine_mips_loongson3v.py
diff options
context:
space:
mode:
authorWillian Rampazzo2021-11-05 16:53:54 +0100
committerPhilippe Mathieu-Daudé2021-11-08 17:00:22 +0100
commitbbbd9b6ec645ca45c2195e894537da4964f1aa12 (patch)
tree687fe629d28745814e6750e632ec871ee0a20eb1 /tests/avocado/machine_mips_loongson3v.py
parenttests/acceptance: introduce new check-avocado target (diff)
downloadqemu-bbbd9b6ec645ca45c2195e894537da4964f1aa12.tar.gz
qemu-bbbd9b6ec645ca45c2195e894537da4964f1aa12.tar.xz
qemu-bbbd9b6ec645ca45c2195e894537da4964f1aa12.zip
tests/acceptance: rename tests acceptance to tests avocado
In the discussion about renaming the `tests/acceptance` [1], the conclusion was that the folders inside `tests` are related to the framework running the tests and not directly related to the type of the tests. This changes the folder to `tests/avocado` and adjusts the MAKEFILE, the CI related files and the documentation. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg06553.html Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Willian Rampazzo <willianr@redhat.com> Message-Id: <20211105155354.154864-3-willianr@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'tests/avocado/machine_mips_loongson3v.py')
-rw-r--r--tests/avocado/machine_mips_loongson3v.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/avocado/machine_mips_loongson3v.py b/tests/avocado/machine_mips_loongson3v.py
new file mode 100644
index 0000000000..85b131a40f
--- /dev/null
+++ b/tests/avocado/machine_mips_loongson3v.py
@@ -0,0 +1,39 @@
+# 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 Test
+from avocado_qemu import wait_for_console_pattern
+
+class MipsLoongson3v(Test):
+ 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:')