summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/oelib/elf.py
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2017-05-12 14:40:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-06 19:02:43 +0100
commit157c3be2ca93f076033f725ec1ee912df91f7488 (patch)
tree8ef896ff7adf78d63b34059cd5b017a4f0a3419a /meta/lib/oeqa/selftest/cases/oelib/elf.py
parent10c512b60d1167122b5fe778b93838dca3def717 (diff)
downloadpoky-157c3be2ca93f076033f725ec1ee912df91f7488.tar.gz
oeqa/selftest/cases: Migrate test cases into the new oe-qa framework
New framework has different classes/decorators so adapt current test cases to support these. Changes include changes on base classes and decorators. Also include paths in selftest/__init__.py isn't needed because the loader is the standard unittest one. (From OE-Core rev: ddbbefdd124604d10bd47dd0266b55a764fcc0ab) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/oelib/elf.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/elf.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/oelib/elf.py b/meta/lib/oeqa/selftest/cases/oelib/elf.py
new file mode 100644
index 0000000000..0451ebaffb
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/oelib/elf.py
@@ -0,0 +1,21 @@
1from oeqa.selftest.case import OESelftestTestCase
2import oe.qa
3
4class TestElf(OESelftestTestCase):
5 def test_machine_name(self):
6 """
7 Test elf_machine_to_string()
8 """
9 self.assertEqual(oe.qa.elf_machine_to_string(0x02), "SPARC")
10 self.assertEqual(oe.qa.elf_machine_to_string(0x03), "x86")
11 self.assertEqual(oe.qa.elf_machine_to_string(0x08), "MIPS")
12 self.assertEqual(oe.qa.elf_machine_to_string(0x14), "PowerPC")
13 self.assertEqual(oe.qa.elf_machine_to_string(0x28), "ARM")
14 self.assertEqual(oe.qa.elf_machine_to_string(0x2A), "SuperH")
15 self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
16 self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
17 self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
18
19 self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown (0)")
20 self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)")
21 self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown ('foobar')")