blob: ddf220140e9481fd3671c2388e0ed311ae4791a5 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
2# SPDX-License-Identifier: MIT
3#
4
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005from oeqa.runtime.case import OERuntimeTestCase
6from oeqa.core.decorator.depends import OETestDepends
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007from oeqa.core.decorator.data import skipIfNotInDataVar
8
9class X32libTest(OERuntimeTestCase):
10
11 @skipIfNotInDataVar('DEFAULTTUNE', 'x86-64-x32',
12 'DEFAULTTUNE is not set to x86-64-x32')
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013 @OETestDepends(['ssh.SSHTest.test_ssh'])
14 def test_x32_file(self):
15 cmd = 'readelf -h /bin/ls | grep Class | grep ELF32'
16 status1 = self.target.run(cmd)[0]
17 cmd = 'readelf -h /bin/ls | grep Machine | grep X86-64'
18 status2 = self.target.run(cmd)[0]
19 msg = ("/bin/ls isn't an X86-64 ELF32 binary. readelf says: %s" %
20 self.target.run("readelf -h /bin/ls")[1])
21 self.assertTrue(status1 == 0 and status2 == 0, msg=msg)