summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/multilib.py
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2016-10-27 16:39:47 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:05:19 +0000
commitb61326efb1bc66202831f9710716b5171a722039 (patch)
tree31e229ee225f0a816eb60a5fb721b021f8eab3e2 /meta/lib/oeqa/runtime/multilib.py
parentba1aec3407e38f4dc4141e4d6300b3d538dc9dd3 (diff)
downloadpoky-b61326efb1bc66202831f9710716b5171a722039.tar.gz
oeqa/runtime: Move to runtime_cases
The new oeqa core framework will modify the structure of the runtime folder the new runtime folder will have python code inside to support runtime test cases. (From OE-Core rev: 637b712096e9d230e15b1a432a561e4118db34c8) 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/runtime/multilib.py')
-rw-r--r--meta/lib/oeqa/runtime/multilib.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/meta/lib/oeqa/runtime/multilib.py b/meta/lib/oeqa/runtime/multilib.py
deleted file mode 100644
index 5cce24f5f4..0000000000
--- a/meta/lib/oeqa/runtime/multilib.py
+++ /dev/null
@@ -1,42 +0,0 @@
1import unittest
2from oeqa.oetest import oeRuntimeTest, skipModule
3from oeqa.utils.decorators import *
4
5def setUpModule():
6 multilibs = oeRuntimeTest.tc.d.getVar("MULTILIBS") or ""
7 if "multilib:lib32" not in multilibs:
8 skipModule("this isn't a multilib:lib32 image")
9
10
11class MultilibTest(oeRuntimeTest):
12
13 def archtest(self, binary, arch):
14 """
15 Check that ``binary`` has the ELF class ``arch`` (e.g. ELF32/ELF64).
16 """
17
18 (status, output) = self.target.run("readelf -h %s" % binary)
19 self.assertEqual(status, 0, "Failed to readelf %s" % binary)
20
21 l = [l.split()[1] for l in output.split('\n') if "Class:" in l]
22 if l:
23 theclass = l[0]
24 else:
25 self.fail("Cannot parse readelf output\n" + s)
26
27 self.assertEqual(theclass, arch, msg="%s isn't %s (is %s)" % (binary, arch, theclass))
28
29 @skipUnlessPassed('test_ssh')
30 def test_check_multilib_libc(self):
31 """
32 Check that a multilib image has both 32-bit and 64-bit libc in.
33 """
34 self.archtest("/lib/libc.so.6", "ELF32")
35 self.archtest("/lib64/libc.so.6", "ELF64")
36
37 @testcase('279')
38 @skipUnlessPassed('test_check_multilib_libc')
39 def test_file_connman(self):
40 self.assertTrue(oeRuntimeTest.hasPackage('lib32-connman'), msg="This test assumes lib32-connman is installed")
41
42 self.archtest("/usr/sbin/connmand", "ELF32")