summary refs log tree commit diff stats
path: root/tests/functional/test_arm_aspeed_rainier.py
diff options
context:
space:
mode:
authorCédric Le Goater <clg@redhat.com>2024-12-06 14:11:31 +0100
committerCédric Le Goater <clg@redhat.com>2024-12-11 07:25:53 +0100
commit38cd5c5235cb3bdca5a45f4b7fb4bf3d1c0ad3ca (patch)
tree9bf614a284598d7336472a9c4a7a5ab6b2d4a762 /tests/functional/test_arm_aspeed_rainier.py
parentc7bc9cab3f5e2c0f807d801d09d0bbe95c4ce825 (diff)
downloadfocaccia-qemu-38cd5c5235cb3bdca5a45f4b7fb4bf3d1c0ad3ca.tar.gz
focaccia-qemu-38cd5c5235cb3bdca5a45f4b7fb4bf3d1c0ad3ca.zip
tests/functional: Introduce a specific test for rainier-bmc machine
This simply moves the rainier-bmc test to a new test file. No changes
in the test. The test_arm_aspeed.py is deleted.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/r/20241206131132.520911-7-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'tests/functional/test_arm_aspeed_rainier.py')
-rw-r--r--tests/functional/test_arm_aspeed_rainier.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/functional/test_arm_aspeed_rainier.py b/tests/functional/test_arm_aspeed_rainier.py
new file mode 100644
index 0000000000..a60274926d
--- /dev/null
+++ b/tests/functional/test_arm_aspeed_rainier.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python3
+#
+# Functional test that boots the ASPEED machines
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from qemu_test import Asset
+from aspeed import AspeedTest
+
+class RainierMachine(AspeedTest):
+
+    ASSET_RAINIER_EMMC = Asset(
+        ('https://fileserver.linaro.org/s/B6pJTwWEkzSDi36/download/'
+         'mmc-p10bmc-20240617.qcow2'),
+        'd523fb478d2b84d5adc5658d08502bc64b1486955683814f89c6137518acd90b')
+
+    def test_arm_aspeed_emmc_boot(self):
+        self.set_machine('rainier-bmc')
+        self.require_netdev('user')
+
+        image_path = self.ASSET_RAINIER_EMMC.fetch()
+
+        self.vm.set_console()
+        self.vm.add_args('-drive',
+                         'file=' + image_path + ',if=sd,id=sd2,index=2',
+                         '-net', 'nic', '-net', 'user', '-snapshot')
+        self.vm.launch()
+
+        self.wait_for_console_pattern('U-Boot SPL 2019.04')
+        self.wait_for_console_pattern('Trying to boot from MMC1')
+        self.wait_for_console_pattern('U-Boot 2019.04')
+        self.wait_for_console_pattern('eMMC 2nd Boot')
+        self.wait_for_console_pattern('## Loading kernel from FIT Image')
+        self.wait_for_console_pattern('Starting kernel ...')
+        self.wait_for_console_pattern('Booting Linux on physical CPU 0xf00')
+        self.wait_for_console_pattern('mmcblk0: p1 p2 p3 p4 p5 p6 p7')
+        self.wait_for_console_pattern('IBM eBMC (OpenBMC for IBM Enterprise')
+
+if __name__ == '__main__':
+    AspeedTest.main()