summary refs log tree commit diff stats
path: root/tests/functional/sh4eb/test_r2d.py
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-08-19 13:23:57 +0200
committerThomas Huth <thuth@redhat.com>2025-08-27 09:46:55 +0200
commit58e95a05dec8bb0c739a2b7192b6d0a96d1a99a5 (patch)
tree83e8bccbbcb2509b36ba93d88829f0ae47a9871e /tests/functional/sh4eb/test_r2d.py
parent5e50a3c9c0f31daf53962914855accdc97a3109b (diff)
downloadfocaccia-qemu-58e95a05dec8bb0c739a2b7192b6d0a96d1a99a5.tar.gz
focaccia-qemu-58e95a05dec8bb0c739a2b7192b6d0a96d1a99a5.zip
tests/functional: Move sh4/sh4eb tests into target-specific folders
The tests/functional folder has become quite crowded, thus move the
sh4 tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-21-thuth@redhat.com>
Diffstat (limited to 'tests/functional/sh4eb/test_r2d.py')
-rwxr-xr-xtests/functional/sh4eb/test_r2d.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/functional/sh4eb/test_r2d.py b/tests/functional/sh4eb/test_r2d.py
new file mode 100755
index 0000000000..473093bbe1
--- /dev/null
+++ b/tests/functional/sh4eb/test_r2d.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+#
+# Boot a Linux kernel on a r2d sh4eb machine and check the console
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from qemu_test import LinuxKernelTest, Asset
+from qemu_test import exec_command_and_wait_for_pattern
+
+
+class R2dEBTest(LinuxKernelTest):
+
+    ASSET_TGZ = Asset(
+        'https://landley.net/bin/mkroot/0.8.11/sh4eb.tgz',
+        'be8c6cb5aef8406899dc5aa5e22b6aa45840eb886cdd3ced51555c10577ada2c')
+
+    def test_sh4eb_r2d(self):
+        self.set_machine('r2d')
+        self.archive_extract(self.ASSET_TGZ)
+        self.vm.add_args('-append', 'console=ttySC1 noiotrap')
+        self.launch_kernel(self.scratch_file('sh4eb', 'linux-kernel'),
+                           initrd=self.scratch_file('sh4eb',
+                                                    'initramfs.cpio.gz'),
+                           console_index=1, wait_for='Type exit when done')
+        exec_command_and_wait_for_pattern(self, 'exit', 'Restarting system')
+
+if __name__ == '__main__':
+    LinuxKernelTest.main()