diff options
| author | Thomas Huth <thuth@redhat.com> | 2025-08-19 13:23:44 +0200 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2025-08-27 09:46:55 +0200 |
| commit | 8de42cb748287d8dcc521d057b107f32d98e5edd (patch) | |
| tree | 967bbd99b3b1ec097ee23f538d93eee3028b0e0e /tests/functional/arm/test_stellaris.py | |
| parent | e534eee5ba6aefd905c16bcb714d1ff8156a0c45 (diff) | |
| download | focaccia-qemu-8de42cb748287d8dcc521d057b107f32d98e5edd.tar.gz focaccia-qemu-8de42cb748287d8dcc521d057b107f32d98e5edd.zip | |
tests/functional: Move arm tests into architecture specific folder
The tests/functional folder has become quite crowded, thus move the arm tests into a target-specific subfolder. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250819112403.432587-8-thuth@redhat.com>
Diffstat (limited to 'tests/functional/arm/test_stellaris.py')
| -rwxr-xr-x | tests/functional/arm/test_stellaris.py | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/functional/arm/test_stellaris.py b/tests/functional/arm/test_stellaris.py new file mode 100755 index 0000000000..cbd21cb1a0 --- /dev/null +++ b/tests/functional/arm/test_stellaris.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +# +# Functional test that checks the serial console of the stellaris machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pattern +from qemu_test import wait_for_console_pattern + + +class StellarisMachine(QemuSystemTest): + + ASSET_DAY22 = Asset( + 'https://www.qemu-advent-calendar.org/2023/download/day22.tar.gz', + 'ae3a63ef4b7a22c21bfc7fc0d85e402fe95e223308ed23ac854405016431ff51') + + def test_lm3s6965evb(self): + self.set_machine('lm3s6965evb') + kernel_path = self.archive_extract(self.ASSET_DAY22, + member='day22/day22.bin') + self.vm.set_console() + self.vm.add_args('-kernel', kernel_path) + self.vm.launch() + + wait_for_console_pattern(self, 'In a one horse open') + + ASSET_NOTMAIN = Asset( + 'https://github.com/Ahelion/QemuArmM4FDemoSw/raw/master/build/notmain.bin', + '6ceda031aa081a420fca2fca9e137fa681d6e3820d820ad1917736cb265e611a') + + def test_lm3s811evb(self): + self.set_machine('lm3s811evb') + kernel_path = self.ASSET_NOTMAIN.fetch() + + self.vm.set_console() + self.vm.add_args('-cpu', 'cortex-m4') + self.vm.add_args('-kernel', kernel_path) + self.vm.launch() + + # The test kernel emits an initial '!' and then waits for input. + # For each character that we send it responds with a certain + # other ASCII character. + wait_for_console_pattern(self, '!') + exec_command_and_wait_for_pattern(self, '789', 'cdf') + + +if __name__ == '__main__': + QemuSystemTest.main() |