tests/functional: Allow microblaze tests to take a machine name argument

Make microblaze tests a bit more generic.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250206131052.30207-14-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2025-02-06 11:47:13 +01:00
parent a029fe842f
commit fe52b090c0
2 changed files with 10 additions and 4 deletions

View file

@ -20,8 +20,8 @@ class MicroblazeMachine(QemuSystemTest):
'day17.tar.xz'),
'3ba7439dfbea7af4876662c97f8e1f0cdad9231fc166e4861d17042489270057')
def test_microblaze_s3adsp1800_be(self):
self.set_machine('petalogix-s3adsp1800')
def do_ballerina_be_test(self, machine):
self.set_machine(machine)
self.archive_extract(self.ASSET_IMAGE_BE)
self.vm.set_console()
self.vm.add_args('-kernel',
@ -34,5 +34,8 @@ class MicroblazeMachine(QemuSystemTest):
# message, that's why we don't test for a later string here. This
# needs some investigation by a microblaze wizard one day...
def test_microblaze_s3adsp1800_legacy_be(self):
self.do_ballerina_be_test('petalogix-s3adsp1800')
if __name__ == '__main__':
QemuSystemTest.main()

View file

@ -21,9 +21,9 @@ class MicroblazeelMachine(QemuSystemTest):
('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'),
'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22')
def test_microblazeel_s3adsp1800_le(self):
def do_xmaton_le_test(self, machine):
self.require_netdev('user')
self.set_machine('petalogix-s3adsp1800')
self.set_machine(machine)
self.archive_extract(self.ASSET_IMAGE_LE)
self.vm.set_console()
self.vm.add_args('-kernel', self.scratch_file('day13', 'xmaton.bin'))
@ -38,5 +38,8 @@ class MicroblazeelMachine(QemuSystemTest):
'tftp -g -r xmaton.png 10.0.2.2 ; md5sum xmaton.png',
'821cd3cab8efd16ad6ee5acc3642a8ea')
def test_microblaze_s3adsp1800_legacy_le(self):
self.do_xmaton_le_test('petalogix-s3adsp1800')
if __name__ == '__main__':
QemuSystemTest.main()