x32lib.py 794 B

1234567891011121314151617
  1. from oeqa.runtime.case import OERuntimeTestCase
  2. from oeqa.core.decorator.depends import OETestDepends
  3. from oeqa.core.decorator.data import skipIfNotInDataVar
  4. class X32libTest(OERuntimeTestCase):
  5. @skipIfNotInDataVar('DEFAULTTUNE', 'x86-64-x32',
  6. 'DEFAULTTUNE is not set to x86-64-x32')
  7. @OETestDepends(['ssh.SSHTest.test_ssh'])
  8. def test_x32_file(self):
  9. cmd = 'readelf -h /bin/ls | grep Class | grep ELF32'
  10. status1 = self.target.run(cmd)[0]
  11. cmd = 'readelf -h /bin/ls | grep Machine | grep X86-64'
  12. status2 = self.target.run(cmd)[0]
  13. msg = ("/bin/ls isn't an X86-64 ELF32 binary. readelf says: %s" %
  14. self.target.run("readelf -h /bin/ls")[1])
  15. self.assertTrue(status1 == 0 and status2 == 0, msg=msg)