qemu-cr16/tests/functional/ppc/test_amiga.py
Thomas Huth 5560bad695 tests/functional/ppc/test_amiga: Fix issues reported by pylint and flake8
Pylint complains about unused variable "tar_name" and a missing "check"
for subprocess.run(), and flake8 suggest a second empty line after the
class. While we're at it, also remove the unused "timeout" class variable
(that was only necessary for the avocado framework which we don't use
anymore).

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251119082636.43286-10-thuth@redhat.com>
2025-11-21 08:33:15 +01:00

41 lines
1.3 KiB
Python
Executable file

#!/usr/bin/env python3
#
# Test AmigaNG boards
#
# Copyright (c) 2023 BALATON Zoltan
#
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
import subprocess
from qemu_test import QemuSystemTest, Asset
from qemu_test import wait_for_console_pattern
class AmigaOneMachine(QemuSystemTest):
ASSET_IMAGE = Asset(
('https://www.hyperion-entertainment.com/index.php/'
'downloads?view=download&format=raw&file=25'),
'8ff39330ba47d4f64de4ee8fd6809e9c010a9ef17fe51e95c3c1d53437cb481f')
def test_ppc_amigaone(self):
self.require_accelerator("tcg")
self.set_machine('amigaone')
self.archive_extract(self.ASSET_IMAGE, format="zip")
bios = self.scratch_file("u-boot-amigaone.bin")
with open(bios, "wb") as bios_fh:
subprocess.run(['tail', '-c', '524288',
self.scratch_file("floppy_edition",
"updater.image")],
stdout=bios_fh, check=True)
self.vm.set_console()
self.vm.add_args('-bios', bios)
self.vm.launch()
wait_for_console_pattern(self, 'FLASH:')
if __name__ == '__main__':
QemuSystemTest.main()