mirror of
https://git.yoctoproject.org/poky
synced 2026-05-27 00:52:38 +02:00
Where there isn't a copyright statement, add one to make it explicit. Also add license identifiers as MIT if there isn't one. (From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
29 lines
1.2 KiB
Python
29 lines
1.2 KiB
Python
#
|
|
# Copyright OpenEmbedded Contributors
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
from unittest.case import TestCase
|
|
import oe.qa
|
|
|
|
class TestElf(TestCase):
|
|
def test_machine_name(self):
|
|
"""
|
|
Test elf_machine_to_string()
|
|
"""
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0x02), "SPARC")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0x03), "x86")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0x08), "MIPS")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0x14), "PowerPC")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0x28), "ARM")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0x2A), "SuperH")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0xF7), "BPF")
|
|
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unset")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)")
|
|
self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown ('foobar')")
|