Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | import unittest |
| 2 | from oeqa.oetest import oeRuntimeTest, skipModule |
| 3 | from oeqa.utils.decorators import * |
| 4 | |
| 5 | def setUpModule(): |
| 6 | #check if DEFAULTTUNE is set and it's value is: x86-64-x32 |
| 7 | defaulttune = oeRuntimeTest.tc.d.getVar("DEFAULTTUNE", True) |
| 8 | if "x86-64-x32" not in defaulttune: |
| 9 | skipModule("DEFAULTTUNE is not set to x86-64-x32") |
| 10 | |
| 11 | class X32libTest(oeRuntimeTest): |
| 12 | |
| 13 | @testcase(281) |
| 14 | @skipUnlessPassed("test_ssh") |
| 15 | def test_x32_file(self): |
| 16 | status1 = self.target.run("readelf -h /bin/ls | grep Class | grep ELF32")[0] |
| 17 | status2 = self.target.run("readelf -h /bin/ls | grep Machine | grep X86-64")[0] |
| 18 | self.assertTrue(status1 == 0 and status2 == 0, msg="/bin/ls isn't an X86-64 ELF32 binary. readelf says: %s" % self.target.run("readelf -h /bin/ls")[1]) |