| 1 | #!/usr/bin/env python3 |
| 2 | # |
| 3 | # Functional test that boots known good tuxboot images the same way |
| 4 | # that tuxrun (www.tuxrun.org) does. This tool is used by things like |
| 5 | # the LKFT project to run regression tests on kernels. |
| 6 | # |
| 7 | # Copyright (c) 2023 Linaro Ltd. |
| 8 | # |
| 9 | # Author: |
| 10 | # Alex Bennée <alex.bennee@linaro.org> |
| 11 | # |
| 12 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 13 | |
| 14 | from qemu_test import Asset |
| 15 | from qemu_test.tuxruntest import TuxRunBaselineTest |
| 16 | |
| 17 | class TuxRunAarch64Test(TuxRunBaselineTest): |
| 18 | |
| 19 | ASSET_ARM64_KERNEL = Asset( |
| 20 | 'https://storage.tuxboot.com/buildroot/20241119/arm64/Image', |
| 21 | 'b74743c5e89e1cea0f73368d24ae0ae85c5204ff84be3b5e9610417417d2f235') |
| 22 | ASSET_ARM64_ROOTFS = Asset( |
| 23 | 'https://storage.tuxboot.com/buildroot/20241119/arm64/rootfs.ext4.zst', |
| 24 | 'a1acaaae2068df4648d04ff75f532aaa8c5edcd6b936122b6f0db4848a07b465') |
| 25 | |
| 26 | def test_arm64(self): |
| 27 | self.set_machine('virt') |
| 28 | self.require_accelerator('tcg') |
| 29 | self.cpu='cortex-a57' |
| 30 | self.console='ttyAMA0' |
| 31 | self.wait_for_shutdown=False |
| 32 | self.common_tuxrun(kernel_asset=self.ASSET_ARM64_KERNEL, |
| 33 | rootfs_asset=self.ASSET_ARM64_ROOTFS) |
| 34 | |
| 35 | ASSET_ARM64BE_KERNEL = Asset( |
| 36 | 'https://storage.tuxboot.com/buildroot/20241119/arm64be/Image', |
| 37 | 'fd6af4f16689d17a2c24fe0053cc212edcdf77abdcaf301800b8d38fa9f6e109') |
| 38 | ASSET_ARM64BE_ROOTFS = Asset( |
| 39 | 'https://storage.tuxboot.com/buildroot/20241119/arm64be/rootfs.ext4.zst', |
| 40 | 'f5e9371b62701aab8dead52592ca7488c8a9e255c9be8d7635c7f30f477c2c21') |
| 41 | |
| 42 | def test_arm64be(self): |
| 43 | self.set_machine('virt') |
| 44 | self.require_accelerator('tcg') |
| 45 | self.cpu='cortex-a57' |
| 46 | self.console='ttyAMA0' |
| 47 | self.wait_for_shutdown=False |
| 48 | self.common_tuxrun(kernel_asset=self.ASSET_ARM64BE_KERNEL, |
| 49 | rootfs_asset=self.ASSET_ARM64BE_ROOTFS) |
| 50 | |
| 51 | if __name__ == '__main__': |
| 52 | TuxRunBaselineTest.main() |