mirror of
https://git.yoctoproject.org/poky
synced 2026-05-29 15:52:40 +02:00
Some tests doesn't need call bitbake so it is better to use the basic unittest case class. [YOCTO #10828] (From OE-Core rev: 4d01610f36eaee8da3126bb5045856279371fd17) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
22 lines
1.0 KiB
Python
22 lines
1.0 KiB
Python
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(0x00), "Unknown (0)")
|
|
self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)")
|
|
self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown ('foobar')")
|